diff --git a/mod/resource/db/install.xml b/mod/resource/db/install.xml
index b31e110d376..e7b8de2db96 100644
--- a/mod/resource/db/install.xml
+++ b/mod/resource/db/install.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/mod/resource/db/upgrade.php b/mod/resource/db/upgrade.php
index 5152e08469e..dc1f0eb1c22 100644
--- a/mod/resource/db/upgrade.php
+++ b/mod/resource/db/upgrade.php
@@ -49,6 +49,20 @@ function xmldb_resource_upgrade($oldversion=0) {
$result = $result && change_field_notnull($table, $field);
}
+ if ($result && $oldversion < 2007012001) {
+
+ if ($CFG->dbfamily == 'mysql') { // Only needed under mysql. The rest are long texts since ages
+
+ /// Changing precision of field alltext on table resource to (medium)
+ $table = new XMLDBTable('resource');
+ $field = new XMLDBField('alltext');
+ $field->setAttributes(XMLDB_TYPE_TEXT, 'medium', null, XMLDB_NOTNULL, null, null, null, null, 'summary');
+
+ /// Launch change of precision for field alltext
+ $result = $result && change_field_precision($table, $field);
+ }
+ }
+
return $result;
}
diff --git a/mod/resource/version.php b/mod/resource/version.php
index 3882cbdb53d..c5f6fd5cfe2 100644
--- a/mod/resource/version.php
+++ b/mod/resource/version.php
@@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2007012000;
+$module->version = 2007012001;
$module->requires = 2006091700; // Requires this Moodle version
$module->cron = 0;