]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed grade_category table definitions to handle change in MySQL versions 5.0.3 and...
authorjgraham909 <jgraham909>
Thu, 16 Mar 2006 19:50:28 +0000 (19:50 +0000)
committerjgraham909 <jgraham909>
Thu, 16 Mar 2006 19:50:28 +0000 (19:50 +0000)
see http://moodle.org/mod/forum/discuss.php?d=41501 for more details.

lib/db/mysql.php
lib/db/mysql.sql
version.php

index af6c043d0a26785b9afcb2bfa2770ba95ef74a09..2829fb274927d90c176a76763e80b4d1829afd95 100644 (file)
@@ -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;
 }
index 131b84ddf2d481d11b379a2076ebe47fee36b49d..d5c09a4eebde741ac4689a16e4b7c795ed5f72e6 100644 (file)
@@ -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 ;
index df40846dc998304bbca7c12e46b37a9f492c3033..87f5a7dbf9b2d56a4b7c90c8d08592127df4a6cd 100644 (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 = 2006031400;  // YYYYMMDD = date
+   $version = 2006031600;  // YYYYMMDD = date
                            //       XY = increments within a single day
 
    $release = '1.6 development';    // Human-friendly version name