Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
c0460b75
Commit
c0460b75
authored
Jul 16, 2007
by
Donal McMullan
Browse files
fixing 691: inconsistent foreign keys in usr
parent
c831eec4
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/db/install.xml
View file @
c0460b75
...
...
@@ -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"
/>
...
...
htdocs/lib/db/upgrade.php
View file @
c0460b75
...
...
@@ -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'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment