From 658a816060c2cc381f030fa2f03937d53ef4cea9 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 900d8cf085..20e37abb9c 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') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer cancellation', + `cancellation_reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','ItemLost', 'WrongTransfer') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer cancellation', PRIMARY KEY (`branchtransfer_id`), KEY `frombranch` (`frombranch`), KEY `tobranch` (`tobranch`), -- 2.20.1