Commit c0460b75 authored by Donal McMullan's avatar Donal McMullan

fixing 691: inconsistent foreign keys in usr

parent c831eec4
......@@ -114,6 +114,7 @@
<KEY NAME="primary" TYPE="primary" FIELDS="id" />
<KEY NAME="institution" TYPE="foreign" FIELDS="institution" REFTABLE="institution" REFFIELDS="name"/>
<KEY NAME="lastauthinstancefk" TYPE="foreign" FIELDS="lastauthinstance" REFTABLE="auth_instance" REFFIELDS="id" />
<KEY NAME="authinstancefk" TYPE="foreign" FIELDS="authinstance" REFTABLE="auth_instance" REFFIELDS="id" />
</KEYS>
<INDEXES>
<INDEX NAME="usernameuk" UNIQUE="true" FIELDS="username,authinstance"/>
......
......@@ -386,6 +386,10 @@ function xmldb_core_upgrade($oldversion=0) {
$key->setAttributes(XMLDB_KEY_FOREIGN, array('lastauthinstance'), 'auth_instance', array('id'));
add_key($table, $key);
$key = new XMLDBKey("authinstancefk");
$key->setAttributes(XMLDB_KEY_FOREIGN, array('authinstance'), 'auth_instance', array('id'));
add_key($table, $key);
$record = new stdClass();
$record->name = 'mahara';
......
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