Skip to content
Browse files

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)
  • Loading branch information...
1 parent c692322 commit c110bf9c4a7598f010c45e14bf835c4cfece6cd3 mjollnir_ committed
Showing with 10 additions and 2 deletions.
  1. +8 −0 mod/wiki/db/postgres7.php
  2. +2 −2 mod/wiki/version.php
View
8 mod/wiki/db/postgres7.php
@@ -45,6 +45,14 @@ 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 < 2004083125) {
+ 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
4 mod/wiki/version.php
@@ -5,8 +5,8 @@
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2004083124; // The current module version (Date: YYYYMMDDXX)
-$module->requires = 2004083123; // Requires this Moodle version
+$module->version = 2004083125; // The current module version (Date: YYYYMMDDXX)
+$module->requires = 2004083129; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)
?>

0 comments on commit c110bf9

Please sign in to comment.
Something went wrong with that request. Please try again.