From 8001aae5039d5a95d4c100437f4ec47255921616 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 12 Jun 2019 22:37:43 +0000 Subject: [PATCH] Bug 10215: DBRev 18.11.06.001 Signed-off-by: Lucas Gass --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_10215.perl | 12 ------------ installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 3 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_10215.perl diff --git a/Koha.pm b/Koha.pm index 797a88aeaf..d13646b5ee 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 = "18.11.06.000"; +$VERSION = "18.11.06.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_10215.perl b/installer/data/mysql/atomicupdate/bug_10215.perl deleted file mode 100644 index 1358cdfb67..0000000000 --- a/installer/data/mysql/atomicupdate/bug_10215.perl +++ /dev/null @@ -1,12 +0,0 @@ -$DBversion = 'XXX'; -if ( CheckVersion($DBversion) ) { - - $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE opacnote opacnote LONGTEXT NULL}); - $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE librariannote librariannote LONGTEXT NULL}); - - $dbh->do(q{UPDATE subscriptionhistory SET opacnote = NULL WHERE opacnote = ''}); - $dbh->do(q{UPDATE subscriptionhistory SET librariannote = NULL WHERE librariannote = ''}); - - SetVersion ($DBversion); - print "Upgrade to $DBversion done (Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b471a55025..7204a22a65 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -17477,6 +17477,19 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = '18.11.06.001'; +if ( CheckVersion($DBversion) ) { + + $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE opacnote opacnote LONGTEXT NULL}); + $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE librariannote librariannote LONGTEXT NULL}); + + $dbh->do(q{UPDATE subscriptionhistory SET opacnote = NULL WHERE opacnote = ''}); + $dbh->do(q{UPDATE subscriptionhistory SET librariannote = NULL WHERE librariannote = ''}); + + SetVersion ($DBversion); + print "Upgrade to $DBversion done (Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.2