diff --git a/db/install.xml b/db/install.xml
index c25af67..09a9964 100644
--- a/db/install.xml
+++ b/db/install.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/db/upgrade.php b/db/upgrade.php
index 37e7d54..462deea 100644
--- a/db/upgrade.php
+++ b/db/upgrade.php
@@ -31,5 +31,19 @@ defined('MOODLE_INTERNAL') || die;
* @return bool always true
*/
function xmldb_customcert_upgrade($oldversion) {
+ global $DB;
+
+ $dbman = $DB->get_manager();
+
+ if ($oldversion < 2016120503) {
+
+ $table = new xmldb_table('customcert_templates');
+ $field = new xmldb_field('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'id');
+ $dbman->change_field_precision($table, $field);
+
+ // Savepoint reached.
+ upgrade_mod_savepoint(true, 2016120503, 'customcert');
+ }
+
return true;
}
diff --git a/version.php b/version.php
index 7912365..db988eb 100644
--- a/version.php
+++ b/version.php
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
-$plugin->version = 2016120502; // The current module version (Date: YYYYMMDDXX).
+$plugin->version = 2016120503; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2016120500; // Requires this Moodle version (3.2).
$plugin->cron = 0; // Period for cron to check this module (secs).
$plugin->component = 'mod_customcert';