From 579e53de7e98f96a9a2bf558a6e859366416fd2c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 22 Aug 2018 12:34:45 +0000 Subject: [PATCH] Bug 20487: DBRev 18.06.00.018 Signed-off-by: Nick Clemens --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_20487.perl | 12 ------------ installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 3 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_20487.perl diff --git a/Koha.pm b/Koha.pm index c63bd08b04..9932209a3f 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.06.00.017"; +$VERSION = "18.06.00.018"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_20487.perl b/installer/data/mysql/atomicupdate/bug_20487.perl deleted file mode 100644 index 553fd6bc22..0000000000 --- a/installer/data/mysql/atomicupdate/bug_20487.perl +++ /dev/null @@ -1,12 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do( q| -UPDATE items LEFT JOIN issues USING (itemnumber) -SET items.onloan = NULL -WHERE issues.itemnumber IS NULL - |); - - # Always end with this (adjust the bug info) - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 20487: Clear items.onloan for unissued items)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index d2013addc8..45e89e3dfa 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16273,6 +16273,17 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 21144: Add ROADTYPE to default authorised values categories)\n"; } +$DBversion = '18.06.00.018'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| +UPDATE items LEFT JOIN issues USING (itemnumber) +SET items.onloan = NULL +WHERE issues.itemnumber IS NULL + |); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20487: Clear items.onloan for unissued items)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5