]> git.mjollnir.org Git - moodle.git/commitdiff
Drop the latest TEXT default existing since XMLDB debut. MDL-6218
authorstronk7 <stronk7>
Mon, 23 Jul 2007 23:28:26 +0000 (23:28 +0000)
committerstronk7 <stronk7>
Mon, 23 Jul 2007 23:28:26 +0000 (23:28 +0000)
lib/db/upgrade.php
version.php

index 7acad27d961817ace4ca4559b4723bd98852526d..a8cb91eac9d2fa1765f1780da1cb2f870332f02a 100644 (file)
@@ -1438,6 +1438,19 @@ function xmldb_main_upgrade($oldversion=0) {
         }
     }
 
+    if ($result && $oldversion < 2007072400) {
+    /// Dropping one DEFAULT in a TEXT column. It's was only one remaining
+    /// since Moodle 1.7, so new servers won't have those anymore.
+
+    /// Changing the default of field sessdata on table sessions2 to drop it
+        $table = new XMLDBTable('sessions2');
+        $field = new XMLDBField('sessdata');
+        $field->setAttributes(XMLDB_TYPE_TEXT, 'big', null, null, null, null, null, null, 'modified');
+
+    /// Launch change of default for field sessdata
+        $result = $result && change_field_default($table, $field);
+    }
+
 
 /*
     /// drop old gradebook tables
index 36786900986ee184a2366f50869f8ccaf5ba5633..c0095f21044d7fd2c66dc15ca630e2892d26921e 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 = 2007072304;  // YYYYMMDD = date
+    $version = 2007072400;  // YYYYMMDD = date
                             //       XY = increments within a single day
 
     $release = '1.9 dev';   // Human-friendly version name