]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed a typo in the MySQL database definition that only shows
authormoodler <moodler>
Wed, 20 Aug 2003 13:06:11 +0000 (13:06 +0000)
committermoodler <moodler>
Wed, 20 Aug 2003 13:06:11 +0000 (13:06 +0000)
up when adding resources to courses with IDs higher than 255

mod/resource/db/mysql.php
mod/resource/db/mysql.sql
mod/resource/version.php

index 0183dddee0dbdd913755de98e6c587007dc5a6bf..7e2a9642cae4b278047b270cc3a018658c2f2b31 100644 (file)
@@ -4,6 +4,12 @@ function resource_upgrade($oldversion) {
 // This function does anything necessary to upgrade
 // older versions to match current functionality
 
+    global $CFG;
+
+    if ($oldversion < 2003082000) {
+        table_column("resource", "course", "course", "integer", "10", "unsigned", "0");
+    }
+
     return true;
 }
 
index ac50cfcabfc689e164a40186da6c319c4b6bac0c..9c308eed4567dea1689a84454430247ce42b0562 100755 (executable)
@@ -16,7 +16,7 @@
 \r
 CREATE TABLE prefix_resource (\r
   id int(10) unsigned NOT NULL auto_increment,\r
-  course tinyint(10) unsigned NOT NULL default '0',\r
+  course int(10) unsigned NOT NULL default '0',\r
   name varchar(255) NOT NULL default '',\r
   type tinyint(4) NOT NULL default '0',\r
   reference varchar(255) default NULL,\r
index a3b4241f86b1fc68c8f3f36ab56165494520b883..5c8804fa12f97f7bbcee17908be28eb658e2f301 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2003072000;
+$module->version  = 2003082000;
 $module->cron     = 0;
 
 ?>