View | Details | Raw Unified | Return to bug 15486
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl (+14 lines)
Line 0 Link Here
1
$DBversion = "XXX";
2
if ( CheckVersion($DBversion) ) {
3
4
    if ( !column_exists( 'issuingrules', 'holds_per_day' ) ) {
5
        $dbh->do(q{
6
            ALTER TABLE `issuingrules`
7
                ADD COLUMN `holds_per_day` SMALLINT(6) DEFAULT NULL
8
                AFTER `holds_per_record`
9
        });
10
    }
11
12
    print "Upgrade to $DBversion done (Bug 15486: Restrict number of holds placed by day)\n";
13
    SetVersion($DBversion);
14
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 882-887 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
882
  `no_auto_renewal_after_hard_limit` date default NULL, -- no auto renewal allowed after a given date
882
  `no_auto_renewal_after_hard_limit` date default NULL, -- no auto renewal allowed after a given date
883
  `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
883
  `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
884
  `holds_per_record` SMALLINT(6) NOT NULL DEFAULT 1, -- How many holds a patron can have on a given bib
884
  `holds_per_record` SMALLINT(6) NOT NULL DEFAULT 1, -- How many holds a patron can have on a given bib
885
  `holds_per_day` SMALLINT(6) DEFAULT NULL, -- How many holds a patron can have on a day
885
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
886
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
886
  overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine
887
  overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine
887
  cap_fine_to_replacement_price BOOLEAN NOT NULL DEFAULT  '0', -- cap the fine based on item's replacement price
888
  cap_fine_to_replacement_price BOOLEAN NOT NULL DEFAULT  '0', -- cap the fine based on item's replacement price
Lines 1893-1899 DROP TABLE IF EXISTS `reserves`; Link Here
1893
CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha
1894
CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha
1894
  `reserve_id` int(11) NOT NULL auto_increment, -- primary key
1895
  `reserve_id` int(11) NOT NULL auto_increment, -- primary key
1895
  `borrowernumber` int(11) NOT NULL default 0, -- foreign key from the borrowers table defining which patron this hold is for
1896
  `borrowernumber` int(11) NOT NULL default 0, -- foreign key from the borrowers table defining which patron this hold is for
1896
  `reservedate` date default NULL, -- the date the hold was places
1897
  `reservedate` date default NULL, -- the date the hold was placed
1897
  `biblionumber` int(11) NOT NULL default 0, -- foreign key from the biblio table defining which bib record this hold is on
1898
  `biblionumber` int(11) NOT NULL default 0, -- foreign key from the biblio table defining which bib record this hold is on
1898
  `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at
1899
  `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at
1899
  `notificationdate` date default NULL, -- currently unused
1900
  `notificationdate` date default NULL, -- currently unused
1900
- 

Return to bug 15486