mirror of
https://github.com/moodle/moodle.git
synced 2025-03-13 20:26:32 +01:00
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
This commit is contained in:
parent
8eb1e7ff81
commit
71dcd6c014
@ -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);");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user