. /** * Customcert module upgrade code. * * @package mod_customcert * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die; /** * Customcert module upgrade code. * * @param int $oldversion the version we are upgrading from * @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; }