From: Jonathan Druart Date: Thu, 25 Jun 2020 08:49:08 +0000 (+0200) Subject: Bug 24986: DBRev 20.06.00.001 X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=1763cd1f8a54c323e9983083df39bfbabf53333c Bug 24986: DBRev 20.06.00.001 Signed-off-by: Jonathan Druart --- diff --git a/Koha.pm b/Koha.pm index 00beea1..bb067e7 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 = "20.06.00.000"; +$VERSION = "20.06.00.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 c2a0433..0000000 --- a/installer/data/mysql/atomicupdate/bug_24986.perl +++ /dev/null @@ -1,22 +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 - |); - } - - NewVersion( $DBversion, 24986, "Switch borrowers address related fields to TINYTEXT or MEDIUMTEXT"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index de5286e..57518f4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22178,6 +22178,28 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, undef, 'All our codebase are belong to everybody' ); } +$DBversion = '20.06.00.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 + |); + } + + NewVersion( $DBversion, 24986, "Switch borrowers address related fields to TINYTEXT or MEDIUMTEXT"); +} + # 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/';