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
e2d3986d
Commit
e2d3986d
authored
Sep 17, 2009
by
Richard Mansfield
Browse files
Add primary key to artefact_file_files, artefact_file_image
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
e86cbb34
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/db/install.xml
View file @
e2d3986d
...
...
@@ -13,6 +13,7 @@
<FIELD
NAME=
"filetype"
TYPE=
"text"
NOTNULL=
"false"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"artefactpk"
TYPE=
"primary"
FIELDS=
"artefact"
/>
<KEY
NAME=
"artefactfk"
TYPE=
"foreign"
FIELDS=
"artefact"
REFTABLE=
"artefact"
REFFIELDS=
"id"
/>
</KEYS>
</TABLE>
...
...
@@ -23,6 +24,7 @@
<FIELD
NAME=
"height"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"false"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"artefactpk"
TYPE=
"primary"
FIELDS=
"artefact"
/>
<KEY
NAME=
"artefactfk"
TYPE=
"foreign"
FIELDS=
"artefact"
REFTABLE=
"artefact"
REFFIELDS=
"id"
/>
</KEYS>
</TABLE>
...
...
htdocs/artefact/file/db/upgrade.php
View file @
e2d3986d
...
...
@@ -227,6 +227,18 @@ function xmldb_artefact_file_upgrade($oldversion=0) {
execute_sql
(
"DELETE FROM
{
artefact_file_files
}
WHERE artefact IN (SELECT id FROM
{
artefact
}
WHERE artefacttype = 'folder')"
);
}
if
(
$oldversion
<
2009091701
)
{
$table
=
new
XMLDBTable
(
'artefact_file_files'
);
$key
=
new
XMLDBKey
(
'artefactpk'
);
$key
->
setAttributes
(
XMLDB_KEY_PRIMARY
,
array
(
'artefact'
));
add_key
(
$table
,
$key
);
$table
=
new
XMLDBTable
(
'artefact_file_image'
);
$key
=
new
XMLDBKey
(
'artefactpk'
);
$key
->
setAttributes
(
XMLDB_KEY_PRIMARY
,
array
(
'artefact'
));
add_key
(
$table
,
$key
);
}
return
$status
;
}
...
...
htdocs/artefact/file/version.php
View file @
e2d3986d
...
...
@@ -28,7 +28,7 @@
defined
(
'INTERNAL'
)
||
die
();
$config
=
new
StdClass
;
$config
->
version
=
200909170
0
;
$config
->
version
=
200909170
1
;
$config
->
release
=
'1.1.0'
;
?>
Write
Preview
Supports
Markdown
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