From a249ed65075958772f28b0fb7f9f0b2755e41f5d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 6 Jun 2019 15:32:14 +0100 Subject: [PATCH] Bug 10215: DBRev 19.05.00.002 Signed-off-by: Martin Renvoize (cherry picked from commit c3346b50bd00778c2e8364b40a7dd7a891c713b4) Signed-off-by: Fridolin Somers --- 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 255ac9e573..26fef8af10 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.05.00.001"; +$VERSION = "19.05.00.002"; 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 68377537fb..db6efb6a77 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -18693,6 +18693,19 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 22960: Fix typo in syspref description)\n"; } +$DBversion = '19.05.00.002'; +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.5