Bug 20144: DBRev 17.12.00.015

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-02-13 14:07:37 -03:00
parent 53e46a5862
commit fc30a2c82c
5 changed files with 37 additions and 8 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "17.12.00.014";
$VERSION = "17.12.00.015";
sub version {
return $VERSION;

View File

@ -1,2 +0,0 @@
ALTER TABLE borrowers MODIFY surname MEDIUMTEXT, MODIFY address MEDIUMTEXT, MODIFY city MEDIUMTEXT;
ALTER TABLE deletedborrowers MODIFY surname MEDIUMTEXT, MODIFY address MEDIUMTEXT, MODIFY city MEDIUMTEXT;

View File

@ -1,3 +0,0 @@
ALTER TABLE export_format MODIFY csv_separator VARCHAR(2) NOT NULL DEFAULT ',', MODIFY field_separator VARCHAR(2), MODIFY subfield_separator VARCHAR(2);
ALTER TABLE export_format MODIFY encoding VARCHAR(255) DEFAULT 'utf8';

View File

@ -1,2 +0,0 @@
ALTER TABLE reserves MODIFY lowestPriority tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE old_reserves MODIFY lowestPriority tinyint(1) NOT NULL DEFAULT 0;

View File

@ -15354,6 +15354,42 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 19790 - Remove additionalauthors.author from installer files)\n";
}
$DBversion = '17.12.00.015';
if( CheckVersion( $DBversion ) ) {
$dbh->do(q|
ALTER TABLE borrowers
MODIFY surname MEDIUMTEXT,
MODIFY address MEDIUMTEXT,
MODIFY city MEDIUMTEXT
|);
$dbh->do(q|
ALTER TABLE deletedborrowers
MODIFY surname MEDIUMTEXT,
MODIFY address MEDIUMTEXT,
MODIFY city MEDIUMTEXT
|);
$dbh->do(q|
ALTER TABLE export_format
MODIFY csv_separator VARCHAR(2) NOT NULL DEFAULT ',',
MODIFY field_separator VARCHAR(2),
MODIFY subfield_separator VARCHAR(2)
|);
$dbh->do(q|
ALTER TABLE export_format MODIFY encoding VARCHAR(255) NOT NULL DEFAULT 'utf8'
|);
$dbh->do(q|
ALTER TABLE reserves MODIFY lowestPriority tinyint(1) NOT NULL DEFAULT 0
|);
$dbh->do(q|
ALTER TABLE old_reserves MODIFY lowestPriority tinyint(1) NOT NULL DEFAULT 0
|);
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20144 - Adapt DB structure to work with new SQL modes)\n";
}
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.