From 1283ff84dc69394dd23479adbe34325589edf83b 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.05.02.005 Signed-off-by: Nick Clemens (cherry picked from commit 579e53de7e98f96a9a2bf558a6e859366416fd2c) Signed-off-by: Martin Renvoize --- 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 9c9a0eb76d..315013eb33 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.05.02.004"; +$VERSION = "18.05.02.005"; 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 f7564f105a..2749dfefda 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16132,6 +16132,17 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 21144: Add ROADTYPE to default authorised values categories)\n"; } +$DBversion = '18.05.02.005'; +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