diff --git a/mod/label/db/mysql.php b/mod/label/db/mysql.php index dbcb9139864..f677b2d91fe 100644 --- a/mod/label/db/mysql.php +++ b/mod/label/db/mysql.php @@ -6,6 +6,10 @@ function label_upgrade($oldversion) { global $CFG; + if ($oldversion < 2003091400) { + table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id"); + } + return true; } diff --git a/mod/label/db/mysql.sql b/mod/label/db/mysql.sql index aa8beb630ef..9d6871bbef2 100644 --- a/mod/label/db/mysql.sql +++ b/mod/label/db/mysql.sql @@ -1,5 +1,6 @@ CREATE TABLE `prefix_label` ( `id` int(10) unsigned NOT NULL auto_increment, + `course` int(10) unsigned NOT NULL default '0', `name` varchar(255) NOT NULL default '', `content` text NOT NULL, `timemodified` int(10) unsigned NOT NULL default '0', diff --git a/mod/label/db/postgres7.php b/mod/label/db/postgres7.php index dbcb9139864..f677b2d91fe 100644 --- a/mod/label/db/postgres7.php +++ b/mod/label/db/postgres7.php @@ -6,6 +6,10 @@ function label_upgrade($oldversion) { global $CFG; + if ($oldversion < 2003091400) { + table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id"); + } + return true; } diff --git a/mod/label/db/postgres7.sql b/mod/label/db/postgres7.sql index 2ec33ec5782..8be8e25898e 100644 --- a/mod/label/db/postgres7.sql +++ b/mod/label/db/postgres7.sql @@ -1,5 +1,6 @@ CREATE TABLE prefix_label ( id SERIAL PRIMARY KEY, + course integer NOT NULL default '0', name varchar(255) default NULL, content text, timemodified integer NOT NULL default '0' diff --git a/mod/label/version.php b/mod/label/version.php index 44252fff31d..7086f89f74c 100644 --- a/mod/label/version.php +++ b/mod/label/version.php @@ -5,7 +5,7 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2003091300; // The current module version (Date: YYYYMMDDXX) +$module->version = 2003091400; // The current module version (Date: YYYYMMDDXX) $module->cron = 0; // Period for cron to check this module (secs) ?>