MDL-16180 - change field precision of parent_type to 20 in mnet rpc function table...
authormjollnir_ <mjollnir_>
Fri, 29 Aug 2008 18:30:01 +0000 (18:30 +0000)
committermjollnir_ <mjollnir_>
Fri, 29 Aug 2008 18:30:01 +0000 (18:30 +0000)
lib/db/install.xml
lib/db/upgrade.php
version.php

index dda246b..516b751 100644 (file)
         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" COMMENT="Unique Function ID" NEXT="function_name"/>
         <FIELD NAME="function_name" TYPE="char" LENGTH="40" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="xmlrpc_path"/>
         <FIELD NAME="xmlrpc_path" TYPE="char" LENGTH="80" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="function_name" NEXT="parent_type"/>
-        <FIELD NAME="parent_type" TYPE="char" LENGTH="6" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="xmlrpc_path" NEXT="parent"/>
+        <FIELD NAME="parent_type" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="xmlrpc_path" NEXT="parent"/>
         <FIELD NAME="parent" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="parent_type" NEXT="enabled"/>
         <FIELD NAME="enabled" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="parent" NEXT="help"/>
         <FIELD NAME="help" TYPE="text" LENGTH="medium" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="enabled" NEXT="profile"/>
index 00f20b3..ad6cddc 100644 (file)
@@ -738,6 +738,19 @@ function xmldb_main_upgrade($oldversion) {
         upgrade_main_savepoint($result, 2008082700);
     }
 
+    if ($result && $oldversion < 2008082900) {
+
+    /// Changing precision of field parent_type on table mnet_rpc to (20)
+        $table = new xmldb_table('mnet_rpc');
+        $field = new xmldb_field('parent_type', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, null, 'xmlrpc_path');
+
+    /// Launch change of precision for field parent_type
+        $dbman->change_field_precision($table, $field);
+
+    /// Main savepoint reached
+        upgrade_main_savepoint($result, 2008082900);
+    }
+
     return $result;
 }
 
index 581230f..7745ab7 100644 (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 = 2008082702;  // YYYYMMDD   = date of the last version bump
+    $version = 2008082900;  // YYYYMMDD   = date of the last version bump
                             //         XX = daily increments
 
     $release = '2.0 dev (Build: 20080829)';  // Human-friendly version name