@@ -, +, @@ --- .../mysql/atomicupdate/cancellation_reason.perl | 16 ++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/cancellation_reason.perl --- a/installer/data/mysql/atomicupdate/cancellation_reason.perl +++ a/installer/data/mysql/atomicupdate/cancellation_reason.perl @@ -0,0 +1,16 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if ( CheckVersion( $DBversion ) ) { + if ( !column_exists( 'reserves', 'cancellation_reason' ) ) { + $dbh->do(q{ + ALTER TABLE reserves ADD COLUMN `cancellation_reason` varchar(80) default NULL AFTER cancellationdate; + }); + } + + if ( !column_exists( 'old_reserves', 'cancellation_reason' ) ) { + $dbh->do(q{ + ALTER TABLE old_reserves ADD COLUMN `cancellation_reason` varchar(80) default NULL AFTER cancellationdate; + }); + } + + NewVersion( $DBversion, 25534, "Add ability to send an email specifying a reason when canceling a hold"); +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1752,6 +1752,7 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha `notificationdate` date default NULL, -- currently unused `reminderdate` date default NULL, -- currently unused `cancellationdate` date default NULL, -- the date this hold was cancelled + `cancellation_reason` varchar(80) default NULL, -- optional authorised value CANCELLATION_REASON `reservenotes` LONGTEXT, -- notes related to this hold `priority` smallint(6) NOT NULL DEFAULT 1, -- where in the queue the patron sits `found` varchar(1) default NULL, -- a one letter code defining what the status is of the hold is after it has been confirmed @@ -1792,6 +1793,7 @@ CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b `notificationdate` date default NULL, -- currently unused `reminderdate` date default NULL, -- currently unused `cancellationdate` date default NULL, -- the date this hold was cancelled + `cancellation_reason` varchar(80) default NULL, -- optional authorised value CANCELLATION_REASON `reservenotes` LONGTEXT, -- notes related to this hold `priority` smallint(6) NOT NULL DEFAULT 1, -- where in the queue the patron sits `found` varchar(1) default NULL, -- a one letter code defining what the status is of the hold is after it has been confirmed --