diff --git a/lib/db/mysql.php b/lib/db/mysql.php index af6c043d0a2..2829fb27492 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1729,6 +1729,10 @@ function main_upgrade($oldversion=0) { set_config('enrol', 'manual'); } } + + if ($oldversion < 2006031600) { + execute_sql(" ALTER TABLE `{$CFG->prefix}grade_category` CHANGE `weight` `weight` decimal(5,2) default '0.00';"); + } return $result; } diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index 131b84ddf2d..d5c09a4eebd 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -291,7 +291,7 @@ CREATE TABLE `prefix_grade_category` ( `drop_x_lowest` int(10) unsigned NOT NULL default '0', `bonus_points` int(10) unsigned NOT NULL default '0', `hidden` int(10) unsigned NOT NULL default '0', - `weight` decimal(4,2) default '0.00', + `weight` decimal(5,2) default '0.00', PRIMARY KEY (`id`), KEY `courseid` (`courseid`) ) TYPE=MyISAM ; diff --git a/version.php b/version.php index df40846dc99..87f5a7dbf9b 100644 --- a/version.php +++ b/version.php @@ -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 = 2006031400; // YYYYMMDD = date + $version = 2006031600; // YYYYMMDD = date // XY = increments within a single day $release = '1.6 development'; // Human-friendly version name