@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_23092.perl | 18 ++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 19 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_23092.perl --- a/installer/data/mysql/atomicupdate/bug_23092.perl +++ a/installer/data/mysql/atomicupdate/bug_23092.perl @@ -0,0 +1,18 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + unless ( column_exists('branchtransfers', 'daterequested') ) { + $dbh->do( + qq{ + ALTER TABLE branchtransfers + ADD + `daterequested` timestamp NOT NULL default CURRENT_TIMESTAMP + AFTER + `itemnumber` + } + ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23092 - Add 'daterequested' field to transfers table)\n"; +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -901,6 +901,7 @@ DROP TABLE IF EXISTS `branchtransfers`; CREATE TABLE `branchtransfers` ( -- information for items that are in transit between branches `branchtransfer_id` int(12) NOT NULL auto_increment, -- primary key `itemnumber` int(11) NOT NULL default 0, -- the itemnumber that it is in transit (items.itemnumber) + `daterequested` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date the transfer was requested `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 --