From: stronk7 Date: Wed, 8 Aug 2007 09:06:09 +0000 (+0000) Subject: Changing course->shortname to 100c under all DBs. Part of MDL-10026 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=341426f0acd3c0cddbe72a5562160582917b3f24;p=moodle.git Changing course->shortname to 100c under all DBs. Part of MDL-10026 --- diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 928ee62df5..eff9fa55a2 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1623,6 +1623,17 @@ function xmldb_main_upgrade($oldversion=0) { } } + if ($result && $oldversion < 2007080800) { /// Normalize course->shortname MDL-10026 + + /// Changing precision of field shortname on table course to (100) + $table = new XMLDBTable('course'); + $field = new XMLDBField('shortname'); + $field->setAttributes(XMLDB_TYPE_CHAR, '100', null, XMLDB_NOTNULL, null, null, null, null, 'fullname'); + + /// Launch change of precision for field shortname + $result = $result && change_field_precision($table, $field); + } + /* /// drop old gradebook tables if ($result && $oldversion < 2007072209) {