From: mjollnir_ Date: Tue, 23 Nov 2004 22:40:48 +0000 (+0000) Subject: Merged from MOODlE_14_STABLE: Attempt to fix bad constraint name in wiki and version... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=38279ad6d8a7efa662aa16e35c2064df86f7dd30;p=moodle.git 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) --- diff --git a/mod/wiki/db/postgres7.php b/mod/wiki/db/postgres7.php index e9b0089809..32625d2745 100644 --- a/mod/wiki/db/postgres7.php +++ b/mod/wiki/db/postgres7.php @@ -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; } diff --git a/mod/wiki/version.php b/mod/wiki/version.php index c2936d3c85..e359ad1393 100644 --- a/mod/wiki/version.php +++ b/mod/wiki/version.php @@ -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)