From a052521afeb192227584ad7913dfaabada24ede8 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 21 Sep 2020 15:20:12 +0100 Subject: [PATCH] Bug 26057: Add datecancelled field to branchtransfers --- installer/data/mysql/atomicupdate/bug_26057.perl | 9 +++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 10 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_26057.perl diff --git a/installer/data/mysql/atomicupdate/bug_26057.perl b/installer/data/mysql/atomicupdate/bug_26057.perl new file mode 100644 index 0000000000..4203a4d1fb --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_26057.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + if( !column_exists( 'branchtransfers', 'datecancelled' ) ) { + $dbh->do( "ALTER TABLE `branchtransfers` ADD COLUMN `datecancelled` datetime default NULL AFTER `datearrived`" ); + } + + NewVersion( $DBversion, 26057, "Add datecancelled field to branchtransfers"); +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 572a56310c..1a292b59f0 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -936,6 +936,7 @@ CREATE TABLE `branchtransfers` ( -- information for items that are in transit be `datesent` datetime default NULL, -- the date the transfer was initialized `frombranch` varchar(10) NOT NULL default '', -- the branch the transfer is coming from `datearrived` datetime default NULL, -- the date the transfer arrived at its destination + `datecancelled` datetime default NULL, -- the date the transfer was cancelled `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', 'Reserve', 'LostReserve', 'CancelReserve'), -- what triggered the transfer -- 2.20.1