From 341426f0acd3c0cddbe72a5562160582917b3f24 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Wed, 8 Aug 2007 09:06:09 +0000 Subject: [PATCH] Changing course->shortname to 100c under all DBs. Part of MDL-10026 --- lib/db/upgrade.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) { -- 2.39.5