From 9d510a2ea02479ab9ca3b11b2a2cca3399d99112 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 8 Dec 2008 08:21:19 +0000 Subject: [PATCH] MDL-13746 course shortname up to 100cc (applied to mnet_enrol_course) --- lib/db/install.xml | 11 ++--------- lib/db/upgrade.php | 13 +++++++++++++ version.php | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 10bcb190d3..c3a4313bfb 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -137,7 +137,6 @@ - @@ -147,7 +146,6 @@ - @@ -157,7 +155,6 @@ - @@ -167,7 +164,6 @@ - @@ -177,7 +173,6 @@ - @@ -187,7 +182,6 @@
- @@ -197,7 +191,6 @@ - @@ -1104,7 +1097,7 @@ - + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 2d95363497..7364cb1644 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1142,6 +1142,19 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint($result, 2008120800); } + if ($result && $oldversion < 2008120801) { + + /// Changing precision of field shortname on table mnet_enrol_course to (100) + $table = new xmldb_table('mnet_enrol_course'); + $field = new xmldb_field('shortname', XMLDB_TYPE_CHAR, '100', null, XMLDB_NOTNULL, null, null, null, null, 'fullname'); + + /// Launch change of precision for field shortname + $dbman->change_field_precision($table, $field); + + /// Main savepoint reached + upgrade_main_savepoint($result, 2008120801); + } + return $result; } diff --git a/version.php b/version.php index aad31f858e..0b3d93ade8 100644 --- a/version.php +++ b/version.php @@ -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 = 2008120800; // YYYYMMDD = date of the last version bump + $version = 2008120801; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 dev (Build: 20081208)'; // Human-friendly version name -- 2.39.5