Permalink
Browse files

Merge branch 'MDL-27246-cutomlang-version' of git://github.com/mudrd8…

…mz/moodle
  • Loading branch information...
2 parents d8a3b87 + c2c9bc3 commit 290a5db67ef9a2afafc0a6fcc06a4f7866a684fc Sam Hemelryk committed May 2, 2011
@@ -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>
@@ -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;
}
@@ -24,5 +24,5 @@
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2010120900;
+$plugin->version = 2011041900;
$plugin->requires = 2010120700;

0 comments on commit 290a5db

Please sign in to comment.