Skip to content
GitLab
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
c7dd5946
Commit
c7dd5946
authored
Oct 25, 2006
by
Penny Leach
Browse files
fixing up more broken foreign key mess
parent
7c5c04fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/lib.php
View file @
c7dd5946
...
...
@@ -180,7 +180,7 @@ abstract class ArtefactType {
if
(
$children
=
$this
->
get_children_metadata
())
{
$this
->
childreninstances
=
array
();
foreach
(
$children
as
$child
)
{
$classname
=
$child
->
type
;
$classname
=
$child
->
artefact
type
;
$instance
=
new
$classname
(
$child
->
id
,
$child
);
$this
->
childreninstances
[]
=
$instance
;
}
...
...
@@ -217,7 +217,7 @@ abstract class ArtefactType {
if
(
!
isset
(
$this
->
parentinstance
))
{
$this
->
parentinstance
=
false
;
if
(
$parent
=
$this
->
get_parent_metadata
())
{
$classname
=
$parent
->
type
;
$classname
=
$parent
->
artefact
type
;
$this
->
parentinstance
=
new
$classname
(
$parent
->
id
,
$parent
);
}
}
...
...
htdocs/lib/db/install.xml
View file @
c7dd5946
...
...
@@ -17,12 +17,14 @@
</TABLE>
<TABLE
NAME=
"installed_artefact_type"
COMMENT=
"Information about each installed artefact type"
NEXT=
"installed_auth"
PREVIOUS=
"installed_artefact"
>
<FIELDS>
<FIELD
NAME=
"name"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"true"
SEQUENCE=
"false"
ENUM=
"false"
NEXT=
"plugin"
/>
<FIELD
NAME=
"id"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"true"
UNSIGNED=
"false"
ENUM=
"false"
NEXT=
"name"
/>
<FIELD
NAME=
"name"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"true"
SEQUENCE=
"false"
ENUM=
"false"
NEXT=
"plugin"
PREVIOUS=
"id"
/>
<FIELD
NAME=
"plugin"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"true"
SEQUENCE=
"false"
ENUM=
"false"
PREVIOUS=
"name"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"name"
COMMENT=
"Primary key for installed artefact types"
NEXT=
"pluginfk"
/>
<KEY
NAME=
"pluginfk"
TYPE=
"foreign"
FIELDS=
"plugin"
REFTABLE=
"installed_artefact"
REFFIELDS=
"name"
PREVIOUS=
"primary"
/>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
COMMENT=
"Primary key for installed artefact types"
NEXT=
"nameuk"
/>
<KEY
NAME=
"nameuk"
TYPE=
"unique"
FIELDS=
"name,plugin"
COMMENTS=
"unique name, plugin"
PREVIOUS=
"primary"
NEXT=
"pluginfk"
/>
<KEY
NAME=
"pluginfk"
TYPE=
"foreign"
FIELDS=
"plugin"
REFTABLE=
"installed_artefact"
REFFIELDS=
"name"
PREVIOUS=
"nameuk"
/>
</KEYS>
</TABLE>
<TABLE
NAME=
"installed_auth"
COMMENT=
"Information about each installed authentication plugin"
PREVIOUS=
"installed_artefact_type"
NEXT=
"config"
>
...
...
@@ -84,9 +86,9 @@
</TABLE>
<TABLE
NAME=
"artefact"
COMMENT=
"Basic information common to all artefact plugin instances"
PREVIOUS=
"usr"
NEXT=
"cron"
>
<FIELDS>
<FIELD
NAME=
"id"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
UNSIGNED=
"false"
SEQUENCE=
"true"
ENUM=
"false"
NEXT=
"type"
/>
<FIELD
NAME=
"type"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"true"
ENUM=
"false"
PREVIOUS=
"id"
NEXT=
"container"
/>
<FIELD
NAME=
"container"
TYPE=
"int"
LENGTH=
"1"
NOTNULL=
"true"
DEFAULT=
"0"
UNSIGNED=
"false"
SEQUENCE=
"false"
ENUM=
"false"
PREVIOUS=
"type"
NEXT=
"parentid"
/>
<FIELD
NAME=
"id"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
UNSIGNED=
"false"
SEQUENCE=
"true"
ENUM=
"false"
NEXT=
"
artefact
type"
/>
<FIELD
NAME=
"
artefact
type"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"true"
ENUM=
"false"
PREVIOUS=
"id"
NEXT=
"container"
/>
<FIELD
NAME=
"container"
TYPE=
"int"
LENGTH=
"1"
NOTNULL=
"true"
DEFAULT=
"0"
UNSIGNED=
"false"
SEQUENCE=
"false"
ENUM=
"false"
PREVIOUS=
"
artefact
type"
NEXT=
"parentid"
/>
<FIELD
NAME=
"parentid"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"false"
UNSIGNED=
"false"
SEQUENCE=
"false"
ENUM=
"false"
PREVIOUS=
"container"
NEXT=
"ctime"
/>
<FIELD
NAME=
"ctime"
TYPE=
"datetime"
NOTNULL=
"true"
PREVIOUS=
"parentid"
NEXT=
"mtime"
/>
<FIELD
NAME=
"mtime"
TYPE=
"datetime"
NOTNULL=
"true"
PREVIOUS=
"ctime"
NEXT=
"vtime"
/>
...
...
@@ -98,7 +100,7 @@
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
NEXT=
"typefk"
/>
<KEY
NAME=
"typefk"
TYPE=
"foreign"
FIELDS=
"type"
REFTABLE=
"installed_artefact_type"
REFFIELDS=
"
name
"
PREVIOUS=
"primary"
NEXT=
"parentfk"
/>
<KEY
NAME=
"typefk"
TYPE=
"foreign"
FIELDS=
"
artefact
type"
REFTABLE=
"installed_artefact_type"
REFFIELDS=
"
id
"
PREVIOUS=
"primary"
NEXT=
"parentfk"
/>
<KEY
NAME=
"parentfk"
TYPE=
"foreign"
FIELDS=
"parentid"
REFTABLE=
"artefact"
REFFIELDS=
"id"
PREVIOUS=
"typefk"
/>
</KEYS>
</TABLE>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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