From 8f21a987767f4f44c5cb7720f692ab0cdf5eb182 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 17 Mar 2020 09:04:17 +0100 Subject: [PATCH] Bug 24722: Same change for old_reserves.priority --- installer/data/mysql/atomicupdate/bug_24722.perl | 4 ++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_24722.perl b/installer/data/mysql/atomicupdate/bug_24722.perl index 9d8c65aaf6..669c96a109 100644 --- a/installer/data/mysql/atomicupdate/bug_24722.perl +++ b/installer/data/mysql/atomicupdate/bug_24722.perl @@ -4,6 +4,10 @@ if( CheckVersion( $DBversion ) ) { ALTER TABLE reserves MODIFY priority SMALLINT(6) NOT NULL |); + $dbh->do(q| + ALTER TABLE old_reserves MODIFY priority SMALLINT(6) NOT NULL + |); + SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 24722 - Enforce NOT NULL constraint for reserves.priority)\n"; } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 7ecf5a77f6..1b3bb35cda 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1797,7 +1797,7 @@ CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b `reminderdate` date default NULL, -- currently unused `cancellationdate` date default NULL, -- the date this hold was cancelled `reservenotes` LONGTEXT, -- notes related to this hold - `priority` smallint(6) default NULL, -- where in the queue the patron sits + `priority` smallint(6) NOT NULL, -- 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 `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this hold was last updated `itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with -- 2.20.1