From d70a60e5ce32547d823ea48b519d686311e3be07 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 23 Apr 2021 09:40:10 +0000 Subject: [PATCH] Bug 12362: DBRev 20.12.00.039 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_12362.perl | 26 ------------------ installer/data/mysql/updatedatabase.pl | 27 +++++++++++++++++++ 3 files changed, 28 insertions(+), 27 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_12362.perl diff --git a/Koha.pm b/Koha.pm index 7d40261c01..4ac8ed1ce0 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.038"; +$VERSION = "20.12.00.039"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_12362.perl b/installer/data/mysql/atomicupdate/bug_12362.perl deleted file mode 100644 index e8b64b833f..0000000000 --- a/installer/data/mysql/atomicupdate/bug_12362.perl +++ /dev/null @@ -1,26 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - # Add reserve reasons enum - $dbh->do( - qq{ - ALTER TABLE - `branchtransfers` - MODIFY COLUMN - `reason` enum( - 'Manual', - 'StockrotationAdvance', - 'StockrotationRepatriation', - 'ReturnToHome', - 'ReturnToHolding', - 'RotatingCollection', - 'Reserve', - 'LostReserve', - 'CancelReserve', - 'TransferCancellation' - ) - AFTER `comments` - } - ); - - NewVersion( $DBversion, 12362, "Add 'TransferCancellion' reason to branchtransfers enum"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c9dc560439..7076a8ea9d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23928,6 +23928,33 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 27281, "Add 'ItemLost' to branchtransfers.cancellation_reason enum"); } +$DBversion = '20.12.00.039'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do( + q{ + ALTER TABLE + `branchtransfers` + MODIFY COLUMN + `reason` enum( + 'Manual', + 'StockrotationAdvance', + 'StockrotationRepatriation', + 'ReturnToHome', + 'ReturnToHolding', + 'RotatingCollection', + 'Reserve', + 'LostReserve', + 'CancelReserve', + 'TransferCancellation' + ) + AFTER `comments` + } + ); + + NewVersion( $DBversion, 12362, "Add 'TransferCancellation' to branchtransfers.reason enum"); +} + # 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