]> git.mjollnir.org Git - moodle.git/commitdiff
Merged form MOODLE_14_STABLE
authormartinlanghoff <martinlanghoff>
Thu, 25 Nov 2004 00:02:58 +0000 (00:02 +0000)
committermartinlanghoff <martinlanghoff>
Thu, 25 Nov 2004 00:02:58 +0000 (00:02 +0000)
Fixed an issue with postgres database upgrade code -- drop either index or constraint if they exist

Merge of patchset arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-430

lib/db/postgres7.php

index acf7e94db3daf0236455ef639f4c5eba2f5795d4..2401f4185555f93a1008e7b8ce8bb1d3d5140720 100644 (file)
@@ -768,6 +768,7 @@ function main_upgrade($oldversion=0) {
         
         // odd! username was missing its unique index!
         // first silently drop it just in case...
+        execute_sql("ALTER TABLE {$CFG->prefix}user DROP CONSTRAINT {$CFG->prefix}user_username_uk;", false);   
         execute_sql("DROP INDEX {$CFG->prefix}user_username_uk", false);
         modify_database('', "CREATE UNIQUE INDEX prefix_user_username_uk ON prefix_user (username);");