Skip to content
Snippets Groups Projects
Commit d9f74592 authored by Tobias Reischmann's avatar Tobias Reischmann
Browse files

Added new db field 'manual' for workflow

It specified if the workflow is triggered manually or automatically
parent db3f5c2e
Branches
No related tags found
No related merge requests found
......@@ -102,6 +102,7 @@
<FIELD NAME="active" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="active status of a workflow"/>
<FIELD NAME="timeactive" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="timestamp the workflow was set active"/>
<FIELD NAME="sortindex" TYPE="int" LENGTH="3" NOTNULL="false" SEQUENCE="false" COMMENT="Sortindex for active workflows"/>
<FIELD NAME="manual" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false" COMMENT="Specifies for active workflows if the workflow is manually or automatically triggered. True, if manual. False, if automatic."/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
......
......@@ -207,5 +207,20 @@ function xmldb_tool_cleanupcourses_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2018021302, 'tool', 'cleanupcourses');
}
if ($oldversion < 2018022000) {
// Define field manual to be added to tool_cleanupcourses_workflow.
$table = new xmldb_table('tool_cleanupcourses_workflow');
$field = new xmldb_field('manual', XMLDB_TYPE_INTEGER, '1', null, null, null, null, 'sortindex');
// Conditionally launch add field manual.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Cleanupcourses savepoint reached.
upgrade_plugin_savepoint(true, 2018022000, 'tool', 'cleanupcourses');
}
return true;
}
\ No newline at end of file
......@@ -23,5 +23,5 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2018021302;
$plugin->version = 2018022000;
$plugin->component = 'tool_cleanupcourses';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment