Use type numeric(5,2) to store value 100.00

This commit is contained in:
paca70 2005-05-15 19:47:07 +00:00
parent 1b6fe5003a
commit 5a8c647613
3 changed files with 7 additions and 2 deletions

View File

@ -1086,6 +1086,11 @@ function main_upgrade($oldversion=0) {
table_column('user', '', 'trackforums', 'int', '4', 'unsigned', '0', 'not null', 'autosubscribe');
}
if ($oldversion < 2005051500) { // Add user tracking prefs field.
table_column('grade_category', 'weight', 'weight', 'numeric(5,2)', '', '', '0.00', '', '');
}
return $result;
}

View File

@ -134,7 +134,7 @@ CREATE TABLE prefix_grade_category (
drop_x_lowest integer NOT NULL default '0',
bonus_points integer NOT NULL default '0',
hidden integer NOT NULL default '0',
weight decimal(4,2) default '0.00'
weight decimal(5,2) default '0.00'
);
CREATE INDEX prefix_grade_category_courseid_idx ON prefix_grade_category (courseid);

View File

@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
$version = 2005050600; // YYYYMMDD = date
$version = 2005051500; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.5 ALPHA'; // Human-friendly version name