Skip to content

Commit

Permalink
Streamline schema updates to accountlines table
Browse files Browse the repository at this point in the history
  • Loading branch information
ctfliblime committed Aug 24, 2011
1 parent 13f2bfe commit 1378b9e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions installer/data/mysql/updatedatabase.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4689,9 +4689,7 @@
}
$DBversion = '4.09.00.001';
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do('ALTER TABLE accountlines change amount amount decimal(10,2) NOT NULL DEFAULT 0');
$dbh->do('ALTER TABLE accountlines change amountoutstanding amountoutstanding decimal(10,2) NOT NULL DEFAULT 0');
$dbh->do('ALTER TABLE accountlines change lastincrement lastincrement decimal(10,2) NOT NULL DEFAULT 0');
$dbh->do('ALTER TABLE accountlines change amount amount decimal(10,2) NOT NULL DEFAULT 0, change amountoutstanding amountoutstanding decimal(10,2) NOT NULL DEFAULT 0, change lastincrement lastincrement decimal(10,2) NOT NULL DEFAULT 0');
SetVersion ($DBversion);
print "Upgrade to $DBversion done ( Prevent floating point rounding problems for money fields in accountlines )\n";
}
Expand Down

0 comments on commit 1378b9e

Please sign in to comment.