From 44ce16d0069fdff7b487753277c11d368a083ccb Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Sat, 15 Sep 2018 21:44:05 +0000 Subject: [PATCH] Bug 21288: DBRev 18.05.03.002 Signed-off-by: Nick Clemens (cherry picked from commit 11e513f83f0c5fdd0d47de14b7c09635faf58ae4) Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_21288.perl | 9 --------- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 3 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_21288.perl diff --git a/Koha.pm b/Koha.pm index 8c89782189..e4d20b4e69 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.03.001"; +$VERSION = "18.05.03.002"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_21288.perl b/installer/data/mysql/atomicupdate/bug_21288.perl deleted file mode 100644 index a4a102a64e..0000000000 --- a/installer/data/mysql/atomicupdate/bug_21288.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do(q{ - CREATE INDEX `by_biblionumber` ON `subscription` (`biblionumber`) - }); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 21288: Slowness in acquisition caused by GetInvoices\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 95835cfc38..38992715b3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16155,6 +16155,17 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 21235: Remove table services_throttle)\n"; } +$DBversion = '18.05.03.002'; +if( CheckVersion( $DBversion ) ) { + unless ( index_exists( 'subscription', 'by_biblionumber' ) ) { + $dbh->do(q{ + CREATE INDEX `by_biblionumber` ON `subscription` (`biblionumber`) + }); + } + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 21288: Slowness in acquisition caused by GetInvoices\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5