Bugzilla – Attachment 107908 Details for
Bug 19889
LocalHoldsPriority needs exclusions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19889: Add exclude_from_local_holds_priority columns to item, deleteditems and categories tables
Bug-19889-Add-excludefromlocalholdspriority-column.patch (text/plain), 4.34 KB, created by
Agustín Moyano
on 2020-08-06 19:04:24 UTC
(
hide
)
Description:
Bug 19889: Add exclude_from_local_holds_priority columns to item, deleteditems and categories tables
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2020-08-06 19:04:24 UTC
Size:
4.34 KB
patch
obsolete
>From ab585d4b1d724c8c720a96bc1995646ca858bd61 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Wed, 10 Jun 2020 16:13:35 -0300 >Subject: [PATCH] Bug 19889: Add exclude_from_local_holds_priority columns to > item, deleteditems and categories tables > >Sponsored-by: Cooperative Information Network (CIN) > >Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> > >Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> >--- > .../data/mysql/atomicupdate/bug-19889.perl | 22 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 3 +++ > 2 files changed, 25 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug-19889.perl > >diff --git a/installer/data/mysql/atomicupdate/bug-19889.perl b/installer/data/mysql/atomicupdate/bug-19889.perl >new file mode 100644 >index 0000000000..99c395af7d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-19889.perl >@@ -0,0 +1,22 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ if( !column_exists( 'items', 'exclude_from_local_holds_priority' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE `items` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `new_status` -- Exclude this item from local holds priority >+ }); >+ } >+ >+ if( !column_exists( 'deleteditems', 'exclude_from_local_holds_priority' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE `deleteditems` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `new_status` -- Exclude this item from local holds priority >+ }); >+ } >+ >+ if( !column_exists( 'categories', 'exclude_from_local_holds_priority' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE `categories` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `change_password` -- Exclude patrons of this category from local holds priority >+ }); >+ } >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 19889, "Add exclude_from_local_holds_priority column to items, deleteditems and categories tables"); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index cc7c133653..2bf4d505e6 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -327,6 +327,7 @@ CREATE TABLE `categories` ( -- this table shows information related to Koha patr > `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'. > `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow, > `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC >+ `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude patrons of this category from local holds priority > PRIMARY KEY (`categorycode`), > UNIQUE KEY `categorycode` (`categorycode`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >@@ -664,6 +665,7 @@ CREATE TABLE `deleteditems` ( > `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t) > `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i) > `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob. >+ `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude this item from local holds priority > PRIMARY KEY (`itemnumber`), > KEY `delitembarcodeidx` (`barcode`), > KEY `delitemstocknumberidx` (`stocknumber`), >@@ -872,6 +874,7 @@ CREATE TABLE `items` ( -- holdings/item information > `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t) > `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i) > `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob. >+ `exclude_from_local_holds_priority` tinyint(1) default NULL, -- Exclude this item from local holds priority > PRIMARY KEY (`itemnumber`), > UNIQUE KEY `itembarcodeidx` (`barcode`), > KEY `itemstocknumberidx` (`stocknumber`), >-- >2.25.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19889
:
105715
|
105716
|
105717
|
105718
|
106435
|
106436
|
106437
|
106438
|
106439
|
106440
|
106441
|
106442
|
107180
|
107187
|
107188
|
107189
|
107190
|
107191
|
107192
|
107193
|
107194
|
107195
|
107196
|
107908
|
107909
|
107910
|
107911
|
107912
|
107913
|
107926
|
107927
|
107928
|
107929
|
107930
|
107931
|
107948
|
108213
|
108214
|
108215
|
108216
|
108217
|
108218
|
108219
|
108220
|
108593
|
108594
|
108595
|
108725
|
108726
|
108728
|
109131
|
109132
|
109285
|
109364
|
109419