moved the database update code to where it belongs

This commit is contained in:
gustav_delius
2004-01-30 21:40:31 +00:00
parent 2b80c9d76a
commit c7cdd6ec82
5 changed files with 7 additions and 12 deletions
-4
View File
@@ -633,10 +633,6 @@ function main_upgrade($oldversion=0) {
if ($oldversion < 2004012900) {
table_column("config", "value", "value", "text", "", "", "");
}
if ($oldversion < 2004013000) {
table_column("forum_posts", "mailed", "mailed", "tinyint", "2");
}
return $result;
-4
View File
@@ -380,10 +380,6 @@ function main_upgrade($oldversion=0) {
table_column("config", "value", "value", "text", "", "", "");
}
if ($oldversion < 2004013000) {
table_column("forum_posts", "mailed", "mailed", "tinyint", "2");
}
return $result;
}
+4
View File
@@ -100,6 +100,10 @@ function forum_upgrade($oldversion) {
if ($oldversion < 2004012200) {
table_column("forum_discussions", "", "groupid", "integer", "10", "unsigned", "0", "", "userid");
}
if ($oldversion < 2004013000) {
table_column("forum_posts", "mailed", "mailed", "tinyint", "2");
}
return true;
+1 -2
View File
@@ -51,7 +51,7 @@ CREATE TABLE prefix_forum_posts (
userid int(10) unsigned NOT NULL default '0',
created int(10) unsigned NOT NULL default '0',
modified int(10) unsigned NOT NULL default '0',
mailed tinyint(1) unsigned NOT NULL default '0',
mailed tinyint(2) unsigned NOT NULL default '0',
subject varchar(255) NOT NULL default '',
message text NOT NULL,
format tinyint(2) NOT NULL default '0',
@@ -103,4 +103,3 @@ INSERT INTO prefix_log_display VALUES ('forum', 'view discussion', 'forum_discus
INSERT INTO prefix_log_display VALUES ('forum', 'view forum', 'forum', 'name');
INSERT INTO prefix_log_display VALUES ('forum', 'subscribe', 'forum', 'name');
INSERT INTO prefix_log_display VALUES ('forum', 'unsubscribe', 'forum', 'name');
+2 -2
View File
@@ -5,8 +5,8 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
$module->version = 2004012800;
$module->requires = 2004012800; // Requires this Moodle version
$module->version = 2004013000;
$module->requires = 2004013000; // Requires this Moodle version
$module->cron = 60;
?>