Skip to content
Snippets Groups Projects
Commit 3226d26c authored by yorickreum's avatar yorickreum
Browse files

add new field to database when upgrading

parent 652c5a7f
Branches
No related tags found
No related merge requests found
......@@ -298,5 +298,20 @@ function xmldb_tool_lifecycle_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2018101000, 'tool', 'lifecycle');
}
// @todo set right version
if ($oldversion < 2018121903) {
// Define field timedeactive to be added to tool_lifecycle_workflow.
$table = new xmldb_table('tool_lifecycle_workflow');
$field = new xmldb_field('timedeactive', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'timeactive');
// Conditionally launch add field id.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Lifecycle savepoint reached.
upgrade_plugin_savepoint(true, 2018121903, 'tool', 'lifecycle');
}
return true;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment