diff --git a/group/db/install.xml b/group/db/install.xml index 5ce78667dba..f4d5cac4822 100644 --- a/group/db/install.xml +++ b/group/db/install.xml @@ -1,5 +1,5 @@ - @@ -10,7 +10,7 @@ - + diff --git a/group/db/upgrade.php b/group/db/upgrade.php index 56e6a919c89..d9dcb25139a 100644 --- a/group/db/upgrade.php +++ b/group/db/upgrade.php @@ -230,6 +230,17 @@ function xmldb_group_upgrade($oldversion=0) { $result = $result && change_field_notnull($table, $field); } + if ($result && $oldversion < 2007012100) { + + /// Changing precision of field lang on table groups to (30) + $table = new XMLDBTable('groups'); + $field = new XMLDBField('lang'); + $field->setAttributes(XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null, null, 'en', 'enrolmentkey'); + + /// Launch change of precision for field lang + $result = $result && change_field_precision($table, $field); + } + return $result; } diff --git a/group/version.php b/group/version.php index c2029279395..83d23853e2e 100644 --- a/group/version.php +++ b/group/version.php @@ -5,7 +5,7 @@ // This fragment is called by /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$group_version = 2007012000; +$group_version = 2007012100; //$module->requires = 2006120400; // Requires this Moodle version ?> diff --git a/lib/db/install.xml b/lib/db/install.xml index 8efa822cf3d..5f9b4c5ea37 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -56,7 +56,7 @@ - + @@ -544,7 +544,7 @@ - + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 05b3478fd3c..fcb39fd66a6 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -559,6 +559,25 @@ function xmldb_main_upgrade($oldversion=0) { } } + if ($result && $oldversion < 2007012101) { + + /// Changing precision of field lang on table course to (30) + $table = new XMLDBTable('course'); + $field = new XMLDBField('lang'); + $field->setAttributes(XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null, null, null, 'groupmodeforce'); + + /// Launch change of precision for field course->lang + $result = $result && change_field_precision($table, $field); + + /// Changing precision of field lang on table user to (30) + $table = new XMLDBTable('user'); + $field = new XMLDBField('lang'); + $field->setAttributes(XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null, null, 'en', 'country'); + + /// Launch change of precision for field user->lang + $result = $result && change_field_precision($table, $field); + } + return $result; } diff --git a/version.php b/version.php index 9a57a347240..d5bdd8cc88d 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 = 2007012100; // YYYYMMDD = date + $version = 2007012101; // YYYYMMDD = date // XY = increments within a single day $release = '1.8 dev'; // Human-friendly version name