Merged from MOODLE_14_STABLE: Attempt to fix the unique index on quiz_attemptonlast_datasets for postgres (requires version bump in quiz AND requires bump in quiz for the getting rid of adodb feedback in execute_sql
This commit is contained in:
@@ -267,6 +267,13 @@ function quiz_upgrade($oldversion) {
|
||||
modify_database('','CREATE INDEX prefix_quiz_responses_question_idx ON prefix_quiz_responses (question);');
|
||||
}
|
||||
|
||||
if ($oldversion < 2004112300) { //try and clean up an old mistake - try and bring us up to what is in postgres7.sql today.
|
||||
execute_sql("ALTER TABLE {$CFG->prefix}quiz_attemptonlast_datasets DROP CONSTRAINT category;",false);
|
||||
execute_sql("ALTER TABLE {$CFG->prefix}quiz_attemptonlast_datasets DROP CONSTRAINT {$CFG->prefix}quiz_attemptonlast_datasets_category_userid;",false);
|
||||
execute_sql("ALTER TABLE {$CFG->prefix}quiz_attemptonlast_datasets DROP CONSTRAINT {$CFG->prefix}quiz_category_userid_unique;",false);
|
||||
modify_database('','ALTER TABLE prefix_quiz_attemptonlast_datasets ADD CONSTRAINT prefix_quiz_category_userid_unique UNIQUE (category,userid);');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2004111700; // The (date) version of this module
|
||||
$module->requires = 2004091700; // Requires this Moodle version
|
||||
$module->version = 2004112300; // The (date) version of this module
|
||||
$module->requires = 2004112300; // Requires this Moodle version
|
||||
$module->cron = 0; // How often should cron check this module (seconds)?
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user