Merge branch 'MDL-27246-cutomlang-version' of git://github.com/mudrd8mz/moodle

This commit is contained in:
Sam Hemelryk 2011-05-02 12:11:23 +08:00
commit 290a5db67e
3 changed files with 17 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="admin/report/customlang/db" VERSION="20101115" COMMENT="XMLDB file for Moodle admin/report/customlang"
<XMLDB PATH="admin/report/customlang/db" VERSION="20110419" COMMENT="XMLDB file for Moodle admin/report/customlang"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
@ -30,11 +30,11 @@
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The normalized name of the plugin" PREVIOUS="id" NEXT="version"/>
<FIELD NAME="version" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="The checked out version of the plugin, null of the version is unknown" PREVIOUS="name"/>
<FIELD NAME="version" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="The checked out version of the plugin, null if the version is unknown" PREVIOUS="name"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>

View File

@ -57,5 +57,18 @@ function xmldb_report_customlang_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2010111500, 'report', 'customlang');
}
/**
* Change the version field from integer to varchar
*/
if ($oldversion < 2011041900) {
$table = new xmldb_table('report_customlang_components');
$field = new xmldb_field('version', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'name');
$dbman->change_field_type($table, $field);
upgrade_plugin_savepoint(true, 2011041900, 'report', 'customlang');
}
return $result;
}

View File

@ -24,5 +24,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2010120900;
$plugin->version = 2011041900;
$plugin->requires = 2010120700;