mirror of
https://github.com/moodle/moodle.git
synced 2025-01-20 06:39:04 +01:00
Fixed database upgrade so that forum->scale is created before the
get_scale_menu tries to use it.
This commit is contained in:
parent
5179875d27
commit
6f4f04df3e
@ -473,10 +473,11 @@ function main_upgrade($oldversion=0) {
|
||||
`timemodified` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM COMMENT='Defines grading scales'");
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($oldversion < 2003081503) {
|
||||
table_column("forum", "", "scale", "integer", "10", "unsigned", "0", "", "assessed");
|
||||
get_scales_menu(0); // Just to force the default scale to be created
|
||||
}
|
||||
|
||||
|
@ -221,6 +221,7 @@ function main_upgrade($oldversion=0) {
|
||||
}
|
||||
|
||||
if ($oldversion < 2003081503) {
|
||||
table_column("forum", "", "scale", "integer", "10", "unsigned", "0", "", "assessed");
|
||||
get_scales_menu(0); // Just to force the default scale to be created
|
||||
}
|
||||
|
||||
|
@ -62,13 +62,8 @@ function forum_upgrade($oldversion) {
|
||||
execute_sql("INSERT INTO {$CFG->prefix}log_display VALUES ('forum', 'move discussion', 'forum_discussions', 'name')");
|
||||
}
|
||||
|
||||
if ($oldversion < 2003081300) {
|
||||
table_column("forum", "assessed", "assessed", "integer", "10", "unsigned", "0");
|
||||
table_column("forum", "", "scale", "integer", "10", "unsigned", "0", "", "assessed");
|
||||
}
|
||||
|
||||
if ($oldversion < 2003081403) {
|
||||
get_scales_menu(); /// This function will create a new default scale
|
||||
table_column("forum", "assessed", "assessed", "integer", "10", "unsigned", "0");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -10,9 +10,6 @@ function forum_upgrade($oldversion) {
|
||||
execute_sql("INSERT INTO {$CFG->prefix}log_display VALUES ('forum', 'move discussion', 'forum_discussions', 'name')");
|
||||
}
|
||||
|
||||
if ($oldversion < 2003081300) {
|
||||
table_column("forum", "", "scale", "integer", "10", "unsigned", "0", "", "assessed");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user