From 77ae53fbcb21d7fda7ab98c1dd0f6b71a696541b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 17 Jan 2020 11:20:37 +0000 Subject: [PATCH] Bug 24436: Add 'Reserve' options to branchtransfers trigger Signed-off-by: Nick Clemens --- installer/data/mysql/atomicupdate/bug_24436.perl | 27 ++++++++++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_24436.perl diff --git a/installer/data/mysql/atomicupdate/bug_24436.perl b/installer/data/mysql/atomicupdate/bug_24436.perl new file mode 100644 index 0000000000..a23ce9ebad --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24436.perl @@ -0,0 +1,27 @@ +$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' + ) + AFTER `comments` + } + ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24299 - Add 'reserve' reasons to branchtransfers enum)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 0641fb02b2..8a350399e4 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -906,7 +906,7 @@ CREATE TABLE `branchtransfers` ( -- information for items that are in transit be `datearrived` datetime default NULL, -- the date the transfer arrived at its destination `tobranch` varchar(10) NOT NULL default '', -- the branch the transfer was going to `comments` LONGTEXT, -- any comments related to the transfer - `reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection'), -- what triggered the transfer + `reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve'), -- what triggered the transfer PRIMARY KEY (`branchtransfer_id`), KEY `frombranch` (`frombranch`), KEY `tobranch` (`tobranch`), -- 2.11.0