From 0df7b30c1c5a4fe7a08dd916b344cdc5affefdfb Mon Sep 17 00:00:00 2001 From: Shi Yao Wang Date: Fri, 15 Aug 2025 08:51:48 -0400 Subject: [PATCH] Bug 20644: Change checkprevcheckout as ENUM at DB level --- .../atomicupdate/bug_20644-add_checkprevcheckout_to_items.pl | 2 +- installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_20644-add_checkprevcheckout_to_items.pl b/installer/data/mysql/atomicupdate/bug_20644-add_checkprevcheckout_to_items.pl index d09e1f1e53b..a44b06df40e 100755 --- a/installer/data/mysql/atomicupdate/bug_20644-add_checkprevcheckout_to_items.pl +++ b/installer/data/mysql/atomicupdate/bug_20644-add_checkprevcheckout_to_items.pl @@ -11,7 +11,7 @@ return { $dbh->do( q{ ALTER TABLE itemtypes - ADD IF NOT EXISTS checkprevcheckout varchar(7) NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for a patron if a item of this type has previously been checked out to the same patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.' + ADD IF NOT EXISTS checkprevcheckout enum('yes', 'no', 'inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for a patron if a item of this type has previously been checked out to the same patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.' AFTER automatic_checkin; } ); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 90bc9d49d51..f0de44e2fcc 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4239,7 +4239,7 @@ CREATE TABLE `itemtypes` ( `searchcategory` varchar(80) DEFAULT NULL COMMENT 'Group this item type with others with the same value on OPAC search options', `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If automatic checkin is enabled for items of this type', `bookable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Activate bookable feature for items related to this item type', - `checkprevcheckout` varchar(7) NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for a patron if a item of this type has previously been checked out to the same patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.', + `checkprevcheckout` enum('yes','no','inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for a patron if a item of this type has previously been checked out to the same patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.', PRIMARY KEY (`itemtype`), UNIQUE KEY `itemtype` (`itemtype`), KEY `itemtypes_ibfk_1` (`parent_type`), -- 2.43.0