Commit 398b3e04 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1760970: Allow the artefact classes to commit in correct order"

parents 4adf4a01 996f06f7
......@@ -26,7 +26,7 @@
<FIELD NAME="artefact" TYPE="int" LENGTH="10" NOTNULL="true" />
<FIELD NAME="width" TYPE="int" LENGTH="10" NOTNULL="false" />
<FIELD NAME="height" TYPE="int" LENGTH="10" NOTNULL="false" />
<FIELD NAME="orientation" TYPE="int" LENGTH="10" NOTNULL="false" DEFAULT="'0'" ENUM="true" ENUMVALUES="'0','90','180','270'" />
<FIELD NAME="orientation" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="'0'" ENUM="true" ENUMVALUES="'0','90','180','270'" />
</FIELDS>
<KEYS>
<KEY NAME="artefactpk" TYPE="primary" FIELDS="artefact" />
......
......@@ -502,7 +502,7 @@ function xmldb_artefact_file_upgrade($oldversion=0) {
log_debug("Add 'orientation' column to the 'artefact_file_image' table for image rotator");
$table = new XMLDBTable('artefact_file_image');
$field = new XMLDBField('orientation');
$field->setAttributes(XMLDB_TYPE_CHAR, 10, null, null, null, XMLDB_ENUM, array('0', '90', '180', '270'), '0');
$field->setAttributes(XMLDB_TYPE_CHAR, 10, null, XMLDB_NOTNULL, null, XMLDB_ENUM, array('0', '90', '180', '270'), '0');
if (!field_exists($table, $field)) {
add_field($table, $field);
}
......
......@@ -1112,7 +1112,6 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
if (!empty($this->contenthash)) {
$this->dirty = true;
$this->commit();
}
}
......
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