From c3346b50bd00778c2e8364b40a7dd7a891c713b4 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.06.00.002 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_10215.perl | 12 ------------ installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_10215.perl diff --git a/Koha.pm b/Koha.pm index ec53abe9fa..5e5d01e632 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.06.00.001"; +$VERSION = "19.06.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 ab5eb24977..1b2b18769b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -18698,6 +18698,20 @@ if( CheckVersion( $DBversion ) ) { SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 22960: Fix typo in syspref description)\n"; } + +$DBversion = '19.06.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