From d4bf05b0544e2b7336bd76c7d8b319cc9d2a362c Mon Sep 17 00:00:00 2001 From: Brendan Gallagher Date: Tue, 31 May 2016 08:56:42 +0000 Subject: [PATCH] Bug 16200: Update DB rev (3.22.07.001) --- Koha.pm | 2 +- ...16200_Convert_expired_holds_to_accounttype_HE.sql | 1 - installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 3 files changed, 13 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 de8c52cb91..88030c646b 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 = "3.22.07.000"; +$VERSION = "3.22.07.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 6697cff101..f266c41f90 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -11631,6 +11631,18 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.22.07.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