From 0ad4e7c7c3904ad9e2feec9f6fb0ffb274998491 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 10 Nov 2020 13:32:09 +0000 Subject: [PATCH] Bug 24603: DBRev 20.06.00.064 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_24603.perl | 20 ------------------- installer/data/mysql/updatedatabase.pl | 15 ++++++++++++++ 3 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24603.perl diff --git a/Koha.pm b/Koha.pm index 6256ac82be..abb8914f92 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 = "20.06.00.063"; +$VERSION = "20.06.00.064"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24603.perl b/installer/data/mysql/atomicupdate/bug_24603.perl deleted file mode 100644 index 2ce47a457b..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24603.perl +++ /dev/null @@ -1,20 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if ( CheckVersion($DBversion) ) { - - $dbh->do( - qq{ - INSERT IGNORE INTO account_credit_types (code, description, can_be_added_manually, is_system) - VALUES - ('CANCELLATION', 'Cancelled charge', 0, 1) - } - ); - - $dbh->do( - qq{ - INSERT IGNORE INTO account_offset_types ( type ) VALUES ('CANCELLATION'); - } - ); - - # Always end with this (adjust the bug info) - NewVersion( $DBversion, 24603, "Add CANCELLATION credit_type_code" ); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bb3220dee6..8d6394b447 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23267,6 +23267,21 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 14866, "Add decreaseloanholds circulation rule" ); } +$DBversion = '20.06.00.064'; +if ( CheckVersion($DBversion) ) { + + $dbh->do(q{ + INSERT IGNORE INTO account_credit_types (code, description, can_be_added_manually, is_system) + VALUES ('CANCELLATION', 'Cancelled charge', 0, 1) + }); + + $dbh->do(q{ + INSERT IGNORE INTO account_offset_types ( type ) VALUES ('CANCELLATION'); + }); + + NewVersion( $DBversion, 24603, "Add CANCELLATION credit_type_code" ); +} + # 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