@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_23027.perl | 11 +++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 12 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_23027.perl --- a/installer/data/mysql/atomicupdate/bug_23027.perl +++ a/installer/data/mysql/atomicupdate/bug_23027.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + if( !column_exists( 'itemtypes', 'automatic_checkin' ) ) { + $dbh->do(q{ + ALTER TABLE itemtypes ADD COLUMN `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0 AFTER `searchcategory` -- 1 if automatic checkin is enabled for items of this type + }); + } + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 23027, "Add automatic_checkin to itemtypes table"); +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -3133,6 +3133,7 @@ CREATE TABLE `itemtypes` ( `sip_media_type` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SIP2 protocol media type for this itemtype', `hideinopac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Hide the item type from the search options in OPAC', `searchcategory` varchar(80) COLLATE utf8mb4_unicode_ci 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, -- 1 if automatic checkin is enabled for items of this type PRIMARY KEY (`itemtype`), UNIQUE KEY `itemtype` (`itemtype`), KEY `itemtypes_ibfk_1` (`parent_type`), --