3 // This file keeps track of upgrades to
6 // Sometimes, changes between versions involve
7 // alterations to database structures and other
8 // major things that may break installations.
10 // The upgrade function in this file will attempt
11 // to perform all the necessary actions to upgrade
12 // your older installtion to the current version.
14 // If there's something it cannot do itself, it
15 // will tell you what you need to do.
17 // The commands in here will all be database-neutral,
18 // using the functions defined in lib/ddllib.php
20 function xmldb_chat_upgrade($oldversion=0) {
22 global $CFG, $THEME, $db;
26 if ($result && $oldversion < 2007012100) {
28 /// Changing precision of field lang on table chat_users to (30)
29 $table = new XMLDBTable('chat_users');
30 $field = new XMLDBField('lang');
31 $field->setAttributes(XMLDB_TYPE_CHAR
, '30', null, XMLDB_NOTNULL
, null, null, null, null, 'course');
33 /// Launch change of precision for field lang
34 $result = $result && change_field_precision($table, $field);