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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1130-1136 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
1130
  `renewalperiod` int(4) default NULL, -- renewal period in the unit set in issuingrules.lengthunit
1130
  `renewalperiod` int(4) default NULL, -- renewal period in the unit set in issuingrules.lengthunit
1131
  `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
1131
  `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
1132
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
1132
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
1133
  overduefinescap decimal default NULL, -- the maximum amount of an overdue fine
1133
  overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine
1134
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
1134
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
1135
  KEY `categorycode` (`categorycode`),
1135
  KEY `categorycode` (`categorycode`),
1136
  KEY `itemtype` (`itemtype`)
1136
  KEY `itemtype` (`itemtype`)
(-)a/installer/data/mysql/updatedatabase.pl (-2 / +9 lines)
Lines 5561-5567 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5561
5561
5562
$DBversion = '3.09.00.027';
5562
$DBversion = '3.09.00.027';
5563
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
5563
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
5564
    $dbh->do("ALTER TABLE issuingrules ADD overduefinescap decimal DEFAULT NULL");
5564
    $dbh->do("ALTER TABLE issuingrules ADD overduefinescap decimal(28,6) DEFAULT NULL");
5565
    my $maxfine = C4::Context->preference('MaxFine');
5565
    my $maxfine = C4::Context->preference('MaxFine');
5566
    if ($maxfine && $maxfine < 900) { # an arbitrary value that tells us it's not "some huge value"
5566
    if ($maxfine && $maxfine < 900) { # an arbitrary value that tells us it's not "some huge value"
5567
      $dbh->do("UPDATE issuingrules SET overduefinescap=?",undef,$maxfine);
5567
      $dbh->do("UPDATE issuingrules SET overduefinescap=?",undef,$maxfine);
Lines 7036-7041 if ( CheckVersion($DBversion) ) { Link Here
7036
    SetVersion($DBversion);
7036
    SetVersion($DBversion);
7037
}
7037
}
7038
7038
7039
7040
$DBversion = "3.13.00.XXX";
7041
if ( CheckVersion($DBversion) ) {
7042
    $dbh->do("ALTER TABLE issuingrules MODIFY COLUMN overduefinescap decimal(28,6) DEFAULT NULL;");
7043
    print "Upgrade to $DBversion done (Bug 10490: Correct datatype for overduefinescap in issuingrules)\n";
7044
    SetVersion($DBversion);
7045
}
7046
7039
=head1 FUNCTIONS
7047
=head1 FUNCTIONS
7040
7048
7041
=head2 TableExists($table)
7049
=head2 TableExists($table)
7042
- 

Return to bug 10490