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..91137ec 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 < 2016052306) { + + $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, 2016052306, 'customcert'); + } + return true; } diff --git a/version.php b/version.php index e1b9c77..8bb6b24 100644 --- a/version.php +++ b/version.php @@ -24,10 +24,10 @@ defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); -$plugin->version = 2016052305; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2016052306; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2016052300; // Requires this Moodle version (3.1). $plugin->cron = 0; // Period for cron to check this module (secs). $plugin->component = 'mod_customcert'; $plugin->maturity = MATURITY_STABLE; -$plugin->release = "3.1 release (Build: 2016052305)"; // User-friendly version number. +$plugin->release = "3.1 release (Build: 2016052306)"; // User-friendly version number.