From 7efb135dfb3d16c8046877de1a47cd1a835bf5d9 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 16 Jul 2020 16:14:40 +1200 Subject: [PATCH] Bug 24986: DBRev 19.11.07.001 Signed-off-by: Aleisha Amohia --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_24986.perl | 23 ------------------ installer/data/mysql/updatedatabase.pl | 24 +++++++++++++++++++ 3 files changed, 25 insertions(+), 24 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24986.perl diff --git a/Koha.pm b/Koha.pm index f05cf751f1..8c08c82c39 100644 --- a/Koha.pm +++ b/Koha.pm @@ -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 = "19.11.07.000"; +$VERSION = "19.11.07.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24986.perl b/installer/data/mysql/atomicupdate/bug_24986.perl deleted file mode 100644 index 21b5fa80c3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24986.perl +++ /dev/null @@ -1,23 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - for my $f (qw( streetnumber streettype zipcode mobile B_streetnumber B_streettype B_zipcode ) ) { - $dbh->do(qq| - ALTER TABLE borrowers MODIFY $f TINYTEXT DEFAULT NULL - |); - $dbh->do(qq| - ALTER TABLE deletedborrowers MODIFY $f TINYTEXT DEFAULT NULL - |); - } - for my $f ( qw( B_address altcontactfirstname altcontactsurname altcontactaddress1 altcontactaddress2 altcontactaddress3 altcontactzipcode altcontactphone ) ) { - $dbh->do(qq| - ALTER TABLE borrowers MODIFY $f MEDIUMTEXT DEFAULT NULL - |); - $dbh->do(qq| - ALTER TABLE deletedborrowers MODIFY $f MEDIUMTEXT DEFAULT NULL - |); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 24986 - Switch borrowers address related fields to TINYTEXT or MEDIUMTEXT)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4de67ce563..337b51ded2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20609,6 +20609,30 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = '19.11.07.001'; +if( CheckVersion( $DBversion ) ) { + + for my $f (qw( streetnumber streettype zipcode mobile B_streetnumber B_streettype B_zipcode ) ) { + $dbh->do(qq| + ALTER TABLE borrowers MODIFY $f TINYTEXT DEFAULT NULL + |); + $dbh->do(qq| + ALTER TABLE deletedborrowers MODIFY $f TINYTEXT DEFAULT NULL + |); + } + for my $f ( qw( B_address altcontactfirstname altcontactsurname altcontactaddress1 altcontactaddress2 altcontactaddress3 altcontactzipcode altcontactphone ) ) { + $dbh->do(qq| + ALTER TABLE borrowers MODIFY $f MEDIUMTEXT DEFAULT NULL + |); + $dbh->do(qq| + ALTER TABLE deletedborrowers MODIFY $f MEDIUMTEXT DEFAULT NULL + |); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24986 - Switch borrowers address related fields to TINYTEXT or MEDIUMTEXT)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5