From bae0eb9ab702f3fe4351e7b3b23a332a998ed6b1 Mon Sep 17 00:00:00 2001 From: Brendan Gallagher Date: Tue, 31 May 2016 08:56:42 +0000 Subject: [PATCH] DBRev up for Bug 16200 - 'Hold waiting too long' fee has a translation problem Signed-off-by: Brendan Gallagher --- Koha.pm | 2 +- ...Bug_16200_Convert_expired_holds_to_accounttype_HE.sql | 1 - installer/data/mysql/updatedatabase.pl | 9 +++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/Bug_16200_Convert_expired_holds_to_accounttype_HE.sql diff --git a/Koha.pm b/Koha.pm index 8173895953..39d25235e2 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 = "16.06.00.000"; +$VERSION = "16.06.00.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/Bug_16200_Convert_expired_holds_to_accounttype_HE.sql b/installer/data/mysql/atomicupdate/Bug_16200_Convert_expired_holds_to_accounttype_HE.sql deleted file mode 100644 index b1c957db31..0000000000 --- a/installer/data/mysql/atomicupdate/Bug_16200_Convert_expired_holds_to_accounttype_HE.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE accountlines SET accounttype='HE', description=itemnumber WHERE (description REGEXP '^Hold waiting too long [0-9]+') AND accounttype='F'; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index fd1fd4e877..657ba4e1c5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -12605,6 +12605,15 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "16.06.00.001"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + UPDATE accountlines SET accounttype='HE', description=itemnumber WHERE (description REGEXP '^Hold waiting too long [0-9]+') AND accounttype='F'; + }); + print "Upgrade to $DBversion done (Bug 16200 - 'Hold waiting too long' fee has a translation problem)\n"; + SetVersion($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 -- 2.20.1