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
b27ac551
Commit
b27ac551
authored
May 01, 2009
by
Richard Mansfield
Browse files
Change artefact attachment upgrade to create mysql index names correctly
parent
f8bf4136
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/db/upgrade.php
View file @
b27ac551
...
...
@@ -926,14 +926,12 @@ function xmldb_core_upgrade($oldversion=0) {
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
DROP FOREIGN KEY
{
arteblogblogfile_blo_fk
}
"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
DROP INDEX
{
arteblogblogfile_blo_ix
}
"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
CHANGE blogpost artefact BIGINT(10) DEFAULT NULL"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
ADD INDEX
{
artefact_attchment_art_ix
}
(artefact)"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
ADD FOREIGN KEY(artefact) REFERENCES
{
artefact
}
(id)"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
ADD CONSTRAINT
{
arteatta_art_fk
}
FOREIGN KEY
{
arteatta_art_ix
}
(artefact) REFERENCES
{
artefact
}
(id)"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
DROP FOREIGN KEY
{
arteblogblogfile_fil_fk
}
"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
DROP INDEX
{
arteblogblogfile_fil_ix
}
"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
CHANGE file attachment BIGINT(10) DEFAULT NULL"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
ADD INDEX
{
artefact_attchment_att_ix
}
(attachment)"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
ADD FOREIGN KEY(attachment) REFERENCES
{
artefact
}
(id)"
);
execute_sql
(
"ALTER TABLE
{
artefact_attachment
}
ADD CONSTRAINT
{
arteatta_att_fk
}
FOREIGN KEY
{
arteatta_att_ix
}
(attachment) REFERENCES
{
artefact
}
(id)"
);
}
// Drop the _pending table. From now on files uploaded as attachments will become artefacts
...
...
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