From 769a939b254cbbf08b2910cea4202f6ee9a7a493 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 23 Apr 2021 09:40:10 +0000 Subject: [PATCH] Bug 27971: DBRev 20.12.00.040 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_27971.perl | 23 ------------------ installer/data/mysql/updatedatabase.pl | 24 +++++++++++++++++++ 3 files changed, 25 insertions(+), 24 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_27971.perl diff --git a/Koha.pm b/Koha.pm index 4ac8ed1ce0..2ff5826a69 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.12.00.039"; +$VERSION = "20.12.00.040"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_27971.perl b/installer/data/mysql/atomicupdate/bug_27971.perl deleted file mode 100644 index 1f252b5655..0000000000 --- a/installer/data/mysql/atomicupdate/bug_27971.perl +++ /dev/null @@ -1,23 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do( - qq{ - INSERT IGNORE INTO account_debit_types ( - code, - description, - can_be_invoiced, - can_be_sold, - default_amount, - is_system - ) - VALUES - ('VOID', 'Credit has been voided', 0, 0, NULL, 1) - } - ); - - $dbh->do(q{ - INSERT IGNORE INTO account_offset_types ( type ) VALUES ('VOID'); - }); - - NewVersion( $DBversion, 27971, "Add VOID debit type code"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7076a8ea9d..8c66f4f2f6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23955,6 +23955,30 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 12362, "Add 'TransferCancellation' to branchtransfers.reason enum"); } +$DBversion = '20.12.00.040'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( + q{ + INSERT IGNORE INTO account_debit_types ( + code, + description, + can_be_invoiced, + can_be_sold, + default_amount, + is_system + ) + VALUES + ('VOID', 'Credit has been voided', 0, 0, NULL, 1) + } + ); + + $dbh->do(q{ + INSERT IGNORE INTO account_offset_types ( type ) VALUES ('VOID'); + }); + + NewVersion( $DBversion, 27971, "Add VOID debit 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