DONAL, PLEASE START USING OUR DB EDITOR! the last commit did have invalid XML, incorrect next/prev attributes, different data in install.xml and upgrade.php; the main reason to have this editor was to prevent this type of critical errors ;-)

This commit is contained in:
skodak 2007-10-02 16:50:43 +00:00
parent 266f6b5900
commit c57be126c4
2 changed files with 13 additions and 14 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="lib/db" VERSION="20071001" COMMENT="XMLDB file for core Moodle tables"
<XMLDB PATH="lib/db" VERSION="20071002" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
@ -1093,10 +1093,8 @@
<FIELD NAME="last_connect_time" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="portno" NEXT="last_log_id"/>
<FIELD NAME="last_log_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="last_connect_time" NEXT="force_theme"/>
<FIELD NAME="force_theme" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="last_log_id" NEXT="theme"/>
<FIELD NAME="theme" TYPE="char" LENGTH="100" NOTNULL="true" UNSIGNED="true" DEFAULT="" SEQUENCE="false" ENUM="false" PREVIOUS="force_theme"/>
</FIELDS>
<FIELD NAME="last_log_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="last_connect_time" NEXT="applicationid"/>
<FIELD NAME="applicationid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="last_log_id"/>
<FIELD NAME="theme" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="force_theme" NEXT="applicationid"/>
<FIELD NAME="applicationid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="theme"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the mnet_host table" NEXT="applicationid"/>
@ -1719,8 +1717,8 @@
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="flagtype" UNIQUE="false" FIELDS="flagtype"/>
<INDEX NAME="name" UNIQUE="false" FIELDS="name"/>
<INDEX NAME="flagtype" UNIQUE="false" FIELDS="flagtype" NEXT="name"/>
<INDEX NAME="name" UNIQUE="false" FIELDS="name" PREVIOUS="flagtype"/>
</INDEXES>
</TABLE>
</TABLES>

View file

@ -2286,22 +2286,23 @@ function xmldb_main_upgrade($oldversion=0) {
}
}
if ($oldversion < 2007100300) {
//
// MNET stuff for roaming theme
//
/// MNET stuff for roaming theme
/// Define field force_theme to be added to mnet_host
$table = new XMLDBTable('mnet_host');
$field = new XMLDBField('force_theme');
$field->setAttributes(XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, null, null, '0', 'last_log_id');
$field->setAttributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'last_log_id');
// Launch add field theme
/// Launch add field force_theme
$result = $result && add_field($table, $field);
/// Define field theme to be added to mnet_host
$table = new XMLDBTable('mnet_host');
$field = new XMLDBField('theme');
$field->setAttributes(XMLDB_TYPE_CHAR, '100', null, null, null, null, null, null, 'force_theme');
// Launch add field force_theme
/// Launch add field theme
$result = $result && add_field($table, $field);
}