]> git.mjollnir.org Git - moodle.git/commitdiff
New database fields in mnet_host for roaming themes
authordonal72 <donal72>
Tue, 2 Oct 2007 15:43:11 +0000 (15:43 +0000)
committerdonal72 <donal72>
Tue, 2 Oct 2007 15:43:11 +0000 (15:43 +0000)
lib/db/install.xml
lib/db/upgrade.php

index 07db7edca05099839ea1d0cde81fc248b14aa4bc..b5313dbedbbaafcf6634369f518baa8fb9a94b85 100644 (file)
         <FIELD NAME="transport" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="public_key_expires" NEXT="portno"/>
         <FIELD NAME="portno" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="transport" NEXT="last_connect_time"/>
         <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"/>
       </FIELDS>
index b33c07f1efa0314c2943f25119c607dcd923bcfb..281ddf1b7bdf437aa7966c56fa57acc3fab85a3a 100644 (file)
@@ -2299,6 +2299,25 @@ function xmldb_main_upgrade($oldversion=0) {
     }
 */
 
+    if ($oldversion < 2007091300) {
+        //
+        // MNET stuff for roaming theme
+        //
+        $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');
+
+        // Launch add field theme
+        $result = $result && add_field($table, $field);
+
+        $field = new XMLDBField('theme');
+        $field->setAttributes(XMLDB_TYPE_CHAR, '100', null, null, null, null, null, null, 'force_theme');
+
+        // Launch add field force_theme
+        $result = $result && add_field($table, $field);
+    }
+
     return $result;
 }