aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib/Migration/Version2019Date20190808074233.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/lib/Migration/Version2019Date20190808074233.php')
-rw-r--r--apps/workflowengine/lib/Migration/Version2019Date20190808074233.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/workflowengine/lib/Migration/Version2019Date20190808074233.php b/apps/workflowengine/lib/Migration/Version2019Date20190808074233.php
index cedee43a9eb..2b9a8aa17cd 100644
--- a/apps/workflowengine/lib/Migration/Version2019Date20190808074233.php
+++ b/apps/workflowengine/lib/Migration/Version2019Date20190808074233.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace OCA\WorkflowEngine\Migration;
use Closure;
+use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Types\Type;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
@@ -69,7 +70,13 @@ class Version2019Date20190808074233 extends SimpleMigrationStep {
$table->addColumn('operation', Type::TEXT, [
'notnull' => false,
]);
+ $this->addEventsColumn($table);
$table->setPrimaryKey(['id']);
+ } else {
+ $table = $schema->getTable('flow_operations');
+ if(!$table->hasColumn('events')) {
+ $this->addEventsColumn($table);
+ }
}
if (!$schema->hasTable('flow_operations_scope')) {
@@ -97,4 +104,11 @@ class Version2019Date20190808074233 extends SimpleMigrationStep {
return $schema;
}
+
+ protected function addEventsColumn(Table $table) {
+ $table->addColumn('events', Type::TEXT, [
+ 'notnull' => true,
+ 'default' => '[]',
+ ]);
+ }
}