Merged from MOODlE_14_STABLE: Attempt to fix bad constraint name in wiki and version bump (honoring partial freeze) and requires bump (needs changes in execute_sql to not show adodb feedback)

This commit is contained in:
mjollnir_ 2004-11-23 22:40:48 +00:00
parent 3c55bb0f9d
commit 38279ad6d8
2 changed files with 10 additions and 1 deletions

View File

@ -52,6 +52,15 @@ function wiki_upgrade($oldversion) {
modify_database('','CREATE INDEX prefix_wiki_entries_course_idx ON prefix_wiki_entries (course);');
modify_database('','CREATE INDEX prefix_wiki_entries_pagename_idx ON prefix_wiki_entries (pagename);');
}
if ($oldversion < 2004112400) {
execute_sql("ALTER TABLE {$CFG->prefix}wiki_pages DROP CONSTRAINT id;",false);
execute_sql("ALTER TABLE {$CFG->prefix}wiki_pages DROP CONSTRAINT {$CFG->prefix}wiki_pages_id;",false);
execute_sql("ALTER TABLE {$CFG->prefix}wiki_pages DROP CONSTRAINT {$CFG->prefix}wiki_pages_pagename_version_wiki_unique;",false);
modify_database("", "ALTER TABLE ONLY prefix_wiki_pages
ADD CONSTRAINT prefix_wiki_pages_pagename_version_wiki_unique PRIMARY KEY (pagename, \"version\", wiki);");
}
return true;
}

View File

@ -5,7 +5,7 @@
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
$module->version = 2004111200; // The current module version (Date: YYYYMMDDXX)
$module->version = 2004112400; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2004110200; // The current module version (Date: YYYYMMDDXX)
$module->cron = 0; // Period for cron to check this module (secs)