Add missing fields when upgrading/installing on Postgres

mod/exercise, mod/scorm and question/type/rqp
MDL-12023
This commit is contained in:
fmarier
2007-11-09 01:21:14 +00:00
parent 1b09c97190
commit c313ffa5db
7 changed files with 32 additions and 7 deletions
+4 -4
View File
@@ -6,10 +6,6 @@ function exercise_upgrade($oldversion) {
global $CFG;
if ($oldversion < 2003121000) {
execute_sql(" ALTER TABLE `{$CFG->prefix}exercise_submissions` ADD `late` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'");
}
if ($oldversion < 2004062300) {
table_column("exercise", "", "gradinggrade", "INTEGER", "4", "UNSIGNED", "0", "NOT NULL", "grade");
table_column("exercise", "", "assessmentcomps", "INTEGER", "4", "UNSIGNED", "2", "NOT NULL", "usemaximum");
@@ -44,6 +40,10 @@ function exercise_upgrade($oldversion) {
modify_database('','CREATE INDEX prefix_exercise_grades_exerciseid_idx ON prefix_exercise_grades (exerciseid);');
}
if ($oldversion < 2006080702) {
table_column("exercise_submissions", "", "late", "INTEGER", "4", "UNSIGNED", "0", "NOT NULL");
}
return true;
}