New field for category themes

This commit is contained in:
ikawhero
2007-05-02 06:50:28 +00:00
parent ca9ffa1887
commit ec75a182db
3 changed files with 15 additions and 3 deletions
+3 -2
View File
@@ -94,7 +94,8 @@
<FIELD NAME="visible" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="false" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="coursecount" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="visible" NEXT="depth"/>
<FIELD NAME="depth" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="path"/>
<FIELD NAME="path" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="depth"/>
<FIELD NAME="path" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="depth" NEXT="theme"/>
<FIELD NAME="theme" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" ENUM="false" COMMENT="Theme for the category" PREVIOUS="path"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for course_categories" NEXT="parent"/>
@@ -1423,4 +1424,4 @@
</SENTENCES>
</STATEMENT>
</STATEMENTS>
</XMLDB>
</XMLDB>
+11
View File
@@ -1141,6 +1141,17 @@ function xmldb_main_upgrade($oldversion=0) {
$result = $result && add_field($table, $field);
}
if ($result && $oldversion < 2007050201) {
/// Define field theme to be added to course_categories
$table = new XMLDBTable('course_categories');
$field = new XMLDBField('theme');
$field->setAttributes(XMLDB_TYPE_CHAR, '50', null, null, null, null, null, null, 'path');
/// Launch add field theme
$result = $result && add_field($table, $field);
}
return $result;
}
+1 -1
View File
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
$version = 2007050200; // YYYYMMDD = date
$version = 2007050201; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.9 dev'; // Human-friendly version name