From: toyomoyo Date: Mon, 13 Aug 2007 02:38:10 +0000 (+0000) Subject: MDL-10821, making configdata nullable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=32fe29c7f3afeca1dc83b0c4347e9145849574e0;p=moodle.git MDL-10821, making configdata nullable --- diff --git a/blocks/db/install.xml b/blocks/db/install.xml index b231f37fc6..ec2fbc3284 100644 --- a/blocks/db/install.xml +++ b/blocks/db/install.xml @@ -1,5 +1,8 @@ - + @@ -24,7 +27,7 @@ - + diff --git a/blocks/db/upgrade.php b/blocks/db/upgrade.php index 9891ea3a99..a92117124b 100644 --- a/blocks/db/upgrade.php +++ b/blocks/db/upgrade.php @@ -32,7 +32,21 @@ function xmldb_blocks_upgrade($oldversion=0) { /// $result = result of "/lib/ddllib.php" function calls /// } + if ($result && $oldversion < 2007081300) { + + /// Changing nullability of field configdata on table block_instance to null + $table = new XMLDBTable('block_instance'); + $field = new XMLDBField('configdata'); + $field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'visible'); + + /// Launch change of nullability for field configdata + $result = $result && change_field_notnull($table, $field); + } + + return $result; } + + ?> diff --git a/blocks/version.php b/blocks/version.php index 2483818935..20c50fa7a9 100644 --- a/blocks/version.php +++ b/blocks/version.php @@ -5,4 +5,4 @@ // database (blocks_version) to determine whether upgrades should // be performed (see db/backup_*.php) -$blocks_version = 2005090201; // The current version is a date (YYYYMMDDXX) +$blocks_version = 2007081300; // The current version is a date (YYYYMMDDXX)