From 233ae2e20a854062e110e67623be9b78c284b5d9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 6 May 2021 14:14:24 +0100 Subject: [PATCH] Bug 24434: Add 'WrongTransfer' to cancellation_reasons Signed-off-by: Victor Grousset/tuxayo --- .../data/mysql/atomicupdate/bug_24434.perl | 28 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_24434.perl diff --git a/installer/data/mysql/atomicupdate/bug_24434.perl b/installer/data/mysql/atomicupdate/bug_24434.perl new file mode 100644 index 0000000000..8c99664ef5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24434.perl @@ -0,0 +1,28 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + # Add 'WrongTransfer' to branchtransfers cancellation_reason enum + $dbh->do( + q{ + ALTER TABLE + `branchtransfers` + MODIFY COLUMN + `cancellation_reason` enum( + 'Manual', + 'StockrotationAdvance', + 'StockrotationRepatriation', + 'ReturnToHome', + 'ReturnToHolding', + 'RotatingCollection', + 'Reserve', + 'LostReserve', + 'CancelReserve', + 'ItemLost', + 'WrongTransfer' + ) + AFTER `comments` + } + ); + + NewVersion( $DBversion, 24434, "Add 'WrongTransfer' to branchtransfers.cancellation_reason enum"); +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 4896b9dcee..3fa09947f0 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1529,7 +1529,7 @@ CREATE TABLE `branchtransfers` ( `tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to', `comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer', `reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve', 'TransferCancellation') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer', - `cancellation_reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'ItemLost') default NULL COMMENT 'what triggered the transfer cancellation', + `cancellation_reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'ItemLost', 'WrongTransfer') default NULL COMMENT 'what triggered the transfer cancellation', PRIMARY KEY (`branchtransfer_id`), KEY `frombranch` (`frombranch`), KEY `tobranch` (`tobranch`), -- 2.31.1