mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Convert DB lang fields to 30cc. Part of MDL-7157
This commit is contained in:
parent
deb12ef4cd
commit
79804e2805
3 changed files with 15 additions and 10 deletions
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/chat/db" VERSION="20060808" COMMENT="XMLDB file for Moodle mod/chat">
|
||||
<XMLDB PATH="mod/chat/db" VERSION="20070122" COMMENT="XMLDB file for Moodle mod/chat"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
<TABLES>
|
||||
<TABLE NAME="chat" COMMENT="Each of these is a chat room" NEXT="chat_messages">
|
||||
<FIELDS>
|
||||
|
@ -53,7 +56,7 @@
|
|||
<FIELD NAME="lastmessageping" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="lastping" NEXT="sid"/>
|
||||
<FIELD NAME="sid" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="lastmessageping" NEXT="course"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="sid" NEXT="lang"/>
|
||||
<FIELD NAME="lang" TYPE="char" LENGTH="10" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="course"/>
|
||||
<FIELD NAME="lang" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="course"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for chat_users" NEXT="chatid"/>
|
||||
|
|
|
@ -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 < 2007012100) {
|
||||
|
||||
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
|
||||
/// $result = result of "/lib/ddllib.php" function calls
|
||||
/// }
|
||||
/// 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;
|
||||
}
|
||||
|
|
|
@ -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)?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue