From e2e9ff654211c27bcb6160b7e6e3c9a15b25d925 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Fri, 22 Mar 2013 10:02:06 +0800 Subject: [PATCH] MDL-38344 Calendar: converted name field in event table to text There is no limitation on length of event name in RFC-2445, so changing type for name from char to text. --- lib/db/install.xml | 2 +- lib/db/upgrade.php | 11 +++++++++++ version.php | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 2ba573590ef..642a11c0961 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -488,7 +488,7 @@ - + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index e7039580a15..317fd89cc32 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1756,5 +1756,16 @@ function xmldb_main_upgrade($oldversion) { // No savepoint needed for this change. } + if ($oldversion < 2013032300.00) { + // Convert name field in event table to text type as RFC-2445 doesn't have any limitation on it. + $table = new xmldb_table('event'); + $field = new xmldb_field('name', XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL, null, null); + if ($dbman->field_exists($table, $field)) { + $dbman->change_field_type($table, $field); + } + // Main savepoint reached. + upgrade_main_savepoint(true, 2013032300.00); + } + return true; } diff --git a/version.php b/version.php index dfd2ffd0f46..d2adf6be67f 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2013031400.00; // YYYYMMDD = weekly release date of this DEV branch +$version = 2013032300.00; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes