From 1e2cb846ecab70a6bdad0d960e4609c954f6583e Mon Sep 17 00:00:00 2001 From: Joy Nelson Date: Wed, 13 May 2020 18:54:56 +0000 Subject: [PATCH] Bug 25478: DBRev 19.11.05.006 Signed-off-by: Joy Nelson --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_25478.perl | 20 ------------------- installer/data/mysql/updatedatabase.pl | 19 ++++++++++++++++++ 3 files changed, 20 insertions(+), 21 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_25478.perl diff --git a/Koha.pm b/Koha.pm index 72a236b73e..281044f3bb 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 = "19.11.05.005"; +$VERSION = "19.11.05.00666666"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_25478.perl b/installer/data/mysql/atomicupdate/bug_25478.perl deleted file mode 100644 index bbc3b78845..0000000000 --- a/installer/data/mysql/atomicupdate/bug_25478.perl +++ /dev/null @@ -1,20 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - # Migrate LOST_RETURNED to LOST_RETURN - $dbh->do(qq{ - UPDATE - accountlines - SET - credit_type_code = 'LOST_RETURN' - WHERE - credit_type_code = 'LOST_RETURNED' - }); - - # Drop LOST_RETURNED credit type - $dbh->do(qq{ - DELETE FROM account_credit_types WHERE code = 'LOST_RETURNED' - }); - - NewVersion( $DBversion, 25389, "Catch errant cases of LOST_RETURNED"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8b950c77a9..e6e2cb2d7c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20529,6 +20529,25 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 25184: Items with a negative notforloan status should not be captured for holds)\n"; } +$DBversion = '19.11.05.006'; +if( CheckVersion( $DBversion ) ) { + # Migrate LOST_RETURNED to LOST_RETURN + $dbh->do(qq{ + UPDATE + accountlines + SET + credit_type_code = 'LOST_RETURN' + WHERE + credit_type_code = 'LOST_RETURNED' + }); + + # Drop LOST_RETURNED credit type + $dbh->do(qq{ + DELETE FROM account_credit_types WHERE code = 'LOST_RETURNED' + }); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 25389: Catch errant cases of LOST_RETURNED)\n"; +} # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.20.1