Bugzilla – Attachment 108708 Details for
Bug 22789
Establish non-priority holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22789: Add non_priority column to reserves and old_reserves
Bug-22789-Add-nonpriority-column-to-reserves-and-o.patch (text/plain), 2.91 KB, created by
ByWater Sandboxes
on 2020-08-19 22:10:40 UTC
(
hide
)
Description:
Bug 22789: Add non_priority column to reserves and old_reserves
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-08-19 22:10:40 UTC
Size:
2.91 KB
patch
obsolete
>From 20fd6d6e875bc2f308325440771e95b7c020cb73 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Wed, 19 Aug 2020 16:11:01 -0300 >Subject: [PATCH] Bug 22789: Add non_priority column to reserves and > old_reserves > >Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> >--- > installer/data/mysql/atomicupdate/bug_22789.perl | 14 ++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 16 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_22789.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22789.perl b/installer/data/mysql/atomicupdate/bug_22789.perl >new file mode 100644 >index 0000000000..1986b14ba6 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22789.perl >@@ -0,0 +1,14 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ # you can use $dbh here like: >+ # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); >+ >+ # or perform some test and warn >+ if( !column_exists( 'reserves', 'non_priority' ) ) { >+ $dbh->do("ALTER TABLE reserves ADD COLUMN `non_priority` tinyint(1) NOT NULL DEFAULT 0 AFTER `item_level_hold` -- Is this a non priority hold"); >+ $dbh->do("ALTER TABLE old_reserves ADD COLUMN `non_priority` tinyint(1) NOT NULL DEFAULT 0 AFTER `item_level_hold` -- Is this a non priority hold"); >+ } >+ >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 22789, "Add non_priority column on reserves and old_reserves tables"); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 35c643fa38..a09eb74d6a 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1772,6 +1772,7 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha > `suspend_until` DATETIME NULL DEFAULT NULL, > `itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting > `item_level_hold` tinyint(1) NOT NULL DEFAULT 0, -- Is the hpld placed at item level >+ `non_priority` tinyint(1) NOT NULL DEFAULT 0, -- Is this a non priority hold > PRIMARY KEY (`reserve_id`), > KEY priorityfoundidx (priority,found), > KEY `borrowernumber` (`borrowernumber`), >@@ -1812,6 +1813,7 @@ CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b > `suspend_until` DATETIME NULL DEFAULT NULL, -- the date this hold is suspended until (NULL for infinitely) > `itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting > `item_level_hold` tinyint(1) NOT NULL DEFAULT 0, -- Is the hpld placed at item level >+ `non_priority` tinyint(1) NOT NULL DEFAULT 0, -- Is this a non priority hold > PRIMARY KEY (`reserve_id`), > KEY `old_reserves_borrowernumber` (`borrowernumber`), > KEY `old_reserves_biblionumber` (`biblionumber`), >-- >2.11.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 22789
:
108703
|
108704
|
108705
|
108706
|
108707
|
108708
|
108709
|
108710
|
109123
|
109124
|
109125
|
109126
|
109127
|
109128
|
109129
|
109200
|
109201
|
109202
|
109203
|
109204
|
109205