Commit 7ccf1ccc authored by Donal McMullan's avatar Donal McMullan
Browse files

Change unique index on usr from username/institution to

username/authinstance
parent a15ae09a
......@@ -135,7 +135,7 @@
<KEY NAME="lastauthinstance" TYPE="foreign" FIELDS="lastauthinstance" REFTABLE="auth_instance" REFFIELDS="id" />
</KEYS>
<INDEXES>
<INDEX NAME="usernameuk" UNIQUE="true" FIELDS="username,institution"/>
<INDEX NAME="usernameuk" UNIQUE="true" FIELDS="username,authinstance"/>
</INDEXES>
</TABLE>
<TABLE NAME="event_type">
......
......@@ -283,6 +283,17 @@ function xmldb_core_upgrade($oldversion=0) {
add_field($table, $field);
}
if ($oldversion < 2007061200) {
$table = new XMLDBTable('usr');
$index = new XMLDBIndex("usernameuk");
$index->setAttributes(XMLDB_INDEX_UNIQUE, array('username', 'institution'));
drop_index($table, $index);
$index = new XMLDBIndex("usernameuk");
$index->setAttributes(XMLDB_INDEX_UNIQUE, array('username', 'authinstance'));
add_index($table, $index);
}
// everything up to here we pre mysql support.
return $status;
......
......@@ -27,7 +27,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2007060203;
$config->version = 2007061200;
$config->release = '0.8.0.dev';
$config->minupgradefrom = 2007011600;
$config->minupgraderelease = '0.4.0 (build tag BUILD_20070122)';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment