Bugzilla – Attachment 65128 Details for
Bug 15486
Restrict number of holds placed by day
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15486: DB structure change
Bug-15486-DB-structure-change.patch (text/plain), 3.14 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-07-19 22:43:20 UTC
(
hide
)
Description:
Bug 15486: DB structure change
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-07-19 22:43:20 UTC
Size:
3.14 KB
patch
obsolete
>From 321cdc6304548763643e20498641c84224d65c89 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 7 Jul 2017 15:13:00 -0300 >Subject: [PATCH] Bug 15486: DB structure change > >This patch adds a new column __max_holds_per_day__ to the issuingrules table. >It's going to be used to set a daily limit for holds. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../mysql/atomicupdate/bug_15486_max_holds_per_day.perl | 14 ++++++++++++++ > installer/data/mysql/kohastructure.sql | 3 ++- > 2 files changed, 16 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl b/installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl >new file mode 100644 >index 0000000000..62ade64c6d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl >@@ -0,0 +1,14 @@ >+$DBversion = "XXX"; >+if ( CheckVersion($DBversion) ) { >+ >+ if ( !column_exists( 'issuingrules', 'holds_per_day' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE `issuingrules` >+ ADD COLUMN `holds_per_day` SMALLINT(6) DEFAULT NULL >+ AFTER `holds_per_record` >+ }); >+ } >+ >+ print "Upgrade to $DBversion done (Bug 15486: Restrict number of holds placed by day)\n"; >+ SetVersion($DBversion); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e227125ff1..e64e97f8a3 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -880,6 +880,7 @@ CREATE TABLE `issuingrules` ( -- circulation and fine rules > `no_auto_renewal_after_hard_limit` date default NULL, -- no auto renewal allowed after a given date > `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed > `holds_per_record` SMALLINT(6) NOT NULL DEFAULT 1, -- How many holds a patron can have on a given bib >+ `holds_per_day` SMALLINT(6) DEFAULT NULL, -- How many holds a patron can have on a day > `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode) > overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine > cap_fine_to_replacement_price BOOLEAN NOT NULL DEFAULT '0', -- cap the fine based on item's replacement price >@@ -1890,7 +1891,7 @@ DROP TABLE IF EXISTS `reserves`; > CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha > `reserve_id` int(11) NOT NULL auto_increment, -- primary key > `borrowernumber` int(11) NOT NULL default 0, -- foreign key from the borrowers table defining which patron this hold is for >- `reservedate` date default NULL, -- the date the hold was places >+ `reservedate` date default NULL, -- the date the hold was placed > `biblionumber` int(11) NOT NULL default 0, -- foreign key from the biblio table defining which bib record this hold is on > `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at > `notificationdate` date default NULL, -- currently unused >-- >2.13.3
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 15486
:
65128
|
65129
|
65130
|
65131
|
65132
|
65133
|
67202
|
67203
|
67204
|
67205
|
67206
|
67207
|
67337
|
67840
|
67841
|
67842
|
67843
|
67844
|
67845
|
68728
|
68729
|
68730
|
68731
|
68732
|
68733
|
68734
|
68735
|
68750
|
68751
|
68752
|
68791
|
71314
|
71315
|
71316
|
71317
|
71318
|
71319
|
72709
|
79318
|
79319
|
79320
|
79321
|
79322
|
79323
|
79324
|
79696
|
79697
|
79698
|
79699
|
79700
|
79701
|
79702
|
80478
|
80479
|
80480
|
80481
|
80482
|
80483
|
80484
|
81087