From 4429b42036061d6cf5662f12e390c521eef65771 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 13 May 2020 10:34:10 +0100 Subject: [PATCH] Bug 25389: DBRev 19.12.00.089 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_25389.perl | 20 ------------------ installer/data/mysql/updatedatabase.pl | 21 +++++++++++++++++++ 3 files changed, 22 insertions(+), 21 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_25389.perl diff --git a/Koha.pm b/Koha.pm index aaf86ba0a6..ca166837c0 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.12.00.088"; +$VERSION = "19.12.00.089"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_25389.perl b/installer/data/mysql/atomicupdate/bug_25389.perl deleted file mode 100644 index 722a4bfacc..0000000000 --- a/installer/data/mysql/atomicupdate/bug_25389.perl +++ /dev/null @@ -1,20 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - # Migrate LOST_RETURNED to LOST_FOUND - $dbh->do(qq{ - UPDATE - accountlines - SET - credit_type_code = 'LOST_FOUND' - 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 5bbef648d2..65190687ac 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22107,6 +22107,27 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 24378, "Fix some grammatical errors in default auto renewal notice"); } +$DBversion = '19.12.00.089'; +if( CheckVersion( $DBversion ) ) { + + # Migrate LOST_RETURNED to LOST_FOUND + $dbh->do(qq{ + UPDATE + accountlines + SET + credit_type_code = 'LOST_FOUND' + 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"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5