From 329025cfa3707a822b31e0fdcb75027be05ceac3 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Sun, 5 Mar 2023 21:03:41 -1000 Subject: [PATCH] Bug 33075: (follow-up) add to deleteditems --- installer/data/mysql/atomicupdate/bug-33075.pl | 12 ++++++++++++ installer/data/mysql/kohastructure.sql | 2 ++ 2 files changed, 14 insertions(+) diff --git a/installer/data/mysql/atomicupdate/bug-33075.pl b/installer/data/mysql/atomicupdate/bug-33075.pl index ee037816e9f..c06d87669a4 100644 --- a/installer/data/mysql/atomicupdate/bug-33075.pl +++ b/installer/data/mysql/atomicupdate/bug-33075.pl @@ -13,10 +13,22 @@ return { }); } + unless (column_exists('deleteditems', 'floating')) { + $dbh->do(q{ + ALTER TABLE `deleteditems` ADD COLUMN `floating` TINYINT NOT NULL DEFAULT 0 COMMENT 'if set, the item does not return to its homebranch after being returned (overrides circulation rules)' AFTER withdrawn_on + }); + } + unless (column_exists('items', 'floating_on')) { $dbh->do(q{ ALTER TABLE `items` ADD COLUMN `floating_on` DATETIME NULL DEFAULT NULL COMMENT 'the date and time an item was last marked as floating, NULL if not floating' AFTER floating }); } + + unless (column_exists('deleteditems', 'floating_on')) { + $dbh->do(q{ + ALTER TABLE `deleteditems` ADD COLUMN `floating_on` DATETIME NULL DEFAULT NULL COMMENT 'the date and time an item was last marked as floating, NULL if not floating' AFTER floating + }); + } }, }; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3f0f208072d..50b84aaa4b9 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2782,6 +2782,8 @@ CREATE TABLE `deleteditems` ( `itemlost_on` datetime DEFAULT NULL COMMENT 'the date and time an item was last marked as lost, NULL if not lost', `withdrawn` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining this item as withdrawn (MARC21 952$0)', `withdrawn_on` datetime DEFAULT NULL COMMENT 'the date and time an item was last marked as withdrawn, NULL if not withdrawn', + `floating` TINYINT NOT NULL DEFAULT 0 COMMENT 'if set, the item does not return to its homebranch after being returned (overrides circulation rules)', + `floating_on` DATETIME NULL DEFAULT NULL COMMENT 'the date and time an item was last marked as floating, NULL if not floating', `itemcallnumber` varchar(255) DEFAULT NULL COMMENT 'call number for this item (MARC21 952$o)', `coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)', `issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out', -- 2.43.0