From 79804e2805e901fc180e2d2abf192fc7866ea50e Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 21 Jan 2007 23:49:23 +0000 Subject: [PATCH] Convert DB lang fields to 30cc. Part of MDL-7157 --- mod/chat/db/install.xml | 7 +++++-- mod/chat/db/upgrade.php | 18 ++++++++++-------- mod/chat/version.php | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/mod/chat/db/install.xml b/mod/chat/db/install.xml index 958bddd6fb..734bde2648 100644 --- a/mod/chat/db/install.xml +++ b/mod/chat/db/install.xml @@ -1,5 +1,8 @@ - + @@ -53,7 +56,7 @@ - + diff --git a/mod/chat/db/upgrade.php b/mod/chat/db/upgrade.php index 4e9bfdf4b4..55fe347678 100644 --- a/mod/chat/db/upgrade.php +++ b/mod/chat/db/upgrade.php @@ -23,14 +23,16 @@ function xmldb_chat_upgrade($oldversion=0) { $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete -/// this comment lines once this file start handling proper -/// upgrade code. - -/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php -/// $result = result of "/lib/ddllib.php" function calls -/// } + if ($result && $oldversion < 2007012100) { + + /// Changing precision of field lang on table chat_users to (30) + $table = new XMLDBTable('chat_users'); + $field = new XMLDBField('lang'); + $field->setAttributes(XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null, null, null, 'course'); + + /// Launch change of precision for field lang + $result = $result && change_field_precision($table, $field); + } return $result; } diff --git a/mod/chat/version.php b/mod/chat/version.php index 01bbd01f6b..54a7481f7e 100644 --- a/mod/chat/version.php +++ b/mod/chat/version.php @@ -5,7 +5,7 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2006091800; // The (date) version of this module +$module->version = 2007012100; // The (date) version of this module $module->requires = 2006080900; // Requires this Moodle version $module->cron = 300; // How often should cron check this module (seconds)? -- 2.39.5