diff --git a/installer/data/mysql/atomicupdate/bug_24287.perl b/installer/data/mysql/atomicupdate/bug_24287.perl new file mode 100644 index 0000000000..7eb3eb65a7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24287.perl @@ -0,0 +1,18 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + unless ( column_exists('branchtransfers', 'reason') ) { + $dbh->do( + qq{ + ALTER TABLE branchtransfers + ADD + `reason` enum('Manual') + AFTER + comments + } + ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24287 - Add 'reason' field to transfers table)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3f28188c02..bcfd900ace 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -951,6 +951,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'), -- what triggered the transfer PRIMARY KEY (`branchtransfer_id`), KEY `frombranch` (`frombranch`), KEY `tobranch` (`tobranch`),