aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-09-26 22:44:21 +0200
committerGitHub <noreply@github.com>2019-09-26 22:44:21 +0200
commit6a261953d47732b57716c6e4da4038536b00a289 (patch)
treeeba07f17296144bb567db3a75c63538a3978c284 /apps/workflowengine/lib
parentcc6874df193565725f4f6b806b84684bb41eceed (diff)
parent2959e15c7a23fd939a6341a70b856752efdf17a1 (diff)
downloadnextcloud-server-6a261953d47732b57716c6e4da4038536b00a289.tar.gz
nextcloud-server-6a261953d47732b57716c6e4da4038536b00a289.zip
Merge pull request #17245 from nextcloud/bugfix/noid/fix-migration
Fix "Cannot add a NOT NULL column with default value NULL"
Diffstat (limited to 'apps/workflowengine/lib')
-rw-r--r--apps/workflowengine/lib/Migration/Version2000Date20190808074233.php (renamed from apps/workflowengine/lib/Migration/Version2019Date20190808074233.php)11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/workflowengine/lib/Migration/Version2019Date20190808074233.php b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php
index 6ac48616b16..c048ffbb5be 100644
--- a/apps/workflowengine/lib/Migration/Version2019Date20190808074233.php
+++ b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php
@@ -11,7 +11,7 @@ use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
-class Version2019Date20190808074233 extends SimpleMigrationStep {
+class Version2000Date20190808074233 extends SimpleMigrationStep {
/**
* @param IOutput $output
@@ -33,10 +33,12 @@ class Version2019Date20190808074233 extends SimpleMigrationStep {
$table->addColumn('class', Type::STRING, [
'notnull' => true,
'length' => 256,
+ 'default' => '',
]);
$table->addColumn('operator', Type::STRING, [
'notnull' => true,
'length' => 16,
+ 'default' => '',
]);
$table->addColumn('value', Type::TEXT, [
'notnull' => false,
@@ -44,6 +46,7 @@ class Version2019Date20190808074233 extends SimpleMigrationStep {
$table->addColumn('hash', Type::STRING, [
'notnull' => true,
'length' => 32,
+ 'default' => '',
]);
$table->setPrimaryKey(['id']);
$table->addUniqueIndex(['hash'], 'flow_unique_hash');
@@ -59,10 +62,12 @@ class Version2019Date20190808074233 extends SimpleMigrationStep {
$table->addColumn('class', Type::STRING, [
'notnull' => true,
'length' => 256,
+ 'default' => '',
]);
$table->addColumn('name', Type::STRING, [
'notnull' => true,
'length' => 256,
+ 'default' => '',
]);
$table->addColumn('checks', Type::TEXT, [
'notnull' => false,
@@ -87,14 +92,17 @@ class Version2019Date20190808074233 extends SimpleMigrationStep {
$table->addColumn('operation_id', Type::INTEGER, [
'notnull' => true,
'length' => 4,
+ 'default' => 0,
]);
$table->addColumn('type', Type::INTEGER, [
'notnull' => true,
'length' => 4,
+ 'default' => 0,
]);
$table->addColumn('value', Type::STRING, [
'notnull' => false,
'length' => 64,
+ 'default' => '',
]);
$table->setPrimaryKey(['id']);
$table->addUniqueIndex(['operation_id', 'type', 'value'], 'flow_unique_scope');
@@ -108,6 +116,7 @@ class Version2019Date20190808074233 extends SimpleMigrationStep {
$table->addColumn('entity', Type::STRING, [
'notnull' => true,
'length' => 256,
+ 'default' => '',
]);
}
if(!$table->hasColumn('events')) {