Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed an issue with postgres database upgrade code -- drop either ind…

…ex or constraint if they exist

Merge of patchset arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-430
  • Loading branch information...
commit d5cbabd8312c3cadf8700b10949ffa2e71e3b9e8 1 parent 8b34bee
martinlanghoff authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/db/postgres7.php
View
1  lib/db/postgres7.php
@@ -705,6 +705,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);");
Please sign in to comment.
Something went wrong with that request. Please try again.