diff --git a/db/install.xml b/db/install.xml
index 1fbf109..1e2a789 100644
--- a/db/install.xml
+++ b/db/install.xml
@@ -75,7 +75,7 @@
-
+
diff --git a/db/upgrade.php b/db/upgrade.php
index a666e93..6b06776 100644
--- a/db/upgrade.php
+++ b/db/upgrade.php
@@ -135,5 +135,16 @@ function xmldb_customcert_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2017050506, 'customcert');
}
+ if ($oldversion < 2017050515) {
+ $table = new xmldb_table('customcert_elements');
+ $field = new xmldb_field('element', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'name');
+
+ // Alter the 'element' column to be characters, rather than text.
+ $dbman->change_field_type($table, $field);
+
+ // Savepoint reached.
+ upgrade_mod_savepoint(true, 2017050515, 'customcert');
+ }
+
return true;
}
diff --git a/version.php b/version.php
index 5530983..61a3feb 100644
--- a/version.php
+++ b/version.php
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
-$plugin->version = 2017050514; // The current module version (Date: YYYYMMDDXX).
+$plugin->version = 2017050515; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->cron = 0; // Period for cron to check this module (secs).
$plugin->component = 'mod_customcert';