From a768dbeaf999523ed3e67ffe2b5292abae85577e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 22 Mar 2021 14:43:42 +0000 Subject: [PATCH] Bug 12362: Add 'TransferCancellation' as a transfer reason This patch adds the database update to add 'TransferCancellation' as a reason for transfer. Signed-off-by: Petro Vashchuk Signed-off-by: Kyle M Hall --- .../data/mysql/atomicupdate/bug_12362.perl | 26 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_12362.perl diff --git a/installer/data/mysql/atomicupdate/bug_12362.perl b/installer/data/mysql/atomicupdate/bug_12362.perl new file mode 100644 index 0000000000..e8b64b833f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_12362.perl @@ -0,0 +1,26 @@ +$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/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e745c44e07..1b81f1b339 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1530,7 +1530,7 @@ CREATE TABLE `branchtransfers` ( `datecancelled` datetime default NULL COMMENT 'the date the transfer was cancelled', `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') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered 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', PRIMARY KEY (`branchtransfer_id`), KEY `frombranch` (`frombranch`), -- 2.24.3 (Apple Git-128)