From 71dcd6c0147b8331324f08bb443b00f2094cf7ca Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Thu, 25 Nov 2004 00:02:58 +0000 Subject: [PATCH] Merged form MOODLE_14_STABLE 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index acf7e94db3..2401f41855 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -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);"); -- 2.39.5