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

(-)a/installer/data/mysql/kohastructure.sql (+3 lines)
Lines 1122-1127 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1122
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1122
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1123
  `return` varchar(4) default NULL,
1123
  `return` varchar(4) default NULL,
1124
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1124
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1125
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1125
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1126
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1126
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1127
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1127
  KEY `issuesborridx` (`borrowernumber`),
1128
  KEY `issuesborridx` (`borrowernumber`),
Lines 1158-1163 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
1158
  `renewalsallowed` smallint(6) NOT NULL default "0", -- how many renewals are allowed
1159
  `renewalsallowed` smallint(6) NOT NULL default "0", -- how many renewals are allowed
1159
  `renewalperiod` int(4) default NULL, -- renewal period in the unit set in issuingrules.lengthunit
1160
  `renewalperiod` int(4) default NULL, -- renewal period in the unit set in issuingrules.lengthunit
1160
  `norenewalbefore` int(4) default NULL, -- no renewal allowed until X days or hours before due date. In the unit set in issuingrules.lengthunit
1161
  `norenewalbefore` int(4) default NULL, -- no renewal allowed until X days or hours before due date. In the unit set in issuingrules.lengthunit
1162
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1161
  `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
1163
  `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
1162
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
1164
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
1163
  overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine
1165
  overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine
Lines 1592-1597 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1592
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1594
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1593
  `return` varchar(4) default NULL,
1595
  `return` varchar(4) default NULL,
1594
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1596
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1597
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1595
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1598
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1596
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1599
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1597
  KEY `old_issuesborridx` (`borrowernumber`),
1600
  KEY `old_issuesborridx` (`borrowernumber`),
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +15 lines)
Lines 8471-8476 if ( CheckVersion($DBversion) ) { Link Here
8471
    SetVersion($DBversion);
8471
    SetVersion($DBversion);
8472
}
8472
}
8473
8473
8474
$DBversion = "3.15.00.XXX";
8475
if(CheckVersion($DBversion)) {
8476
    $dbh->do(q{
8477
        ALTER TABLE issues ADD auto_renew BOOLEAN default FALSE AFTER renewals
8478
    });
8479
    $dbh->do(q{
8480
        ALTER TABLE old_issues ADD auto_renew BOOLEAN default FALSE AFTER renewals
8481
    });
8482
    $dbh->do(q{
8483
        ALTER TABLE issuingrules ADD auto_renew BOOLEAN default FALSE AFTER norenewalbefore
8484
    });
8485
    print "Upgrade to $DBversion done (Bug 11577: [ENH] Automatic renewal feature)\n";
8486
    SetVersion($DBversion);
8487
}
8488
8474
=head1 FUNCTIONS
8489
=head1 FUNCTIONS
8475
8490
8476
=head2 TableExists($table)
8491
=head2 TableExists($table)
8477
- 

Return to bug 11577