]> source.dussan.org Git - nextcloud-server.git/commitdiff
avoid empty null default with value that will be inserted anyways 24333/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 23 Nov 2020 20:17:37 +0000 (21:17 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 24 Nov 2020 10:31:27 +0000 (10:31 +0000)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php
apps/workflowengine/lib/Migration/Version2000Date20190808074233.php

index 6f344c2ee2dd5ebb70f37c112b9450ca712b8d0b..50b38f819939b3b7c47ea718b2c1b0c57f372d56 100644 (file)
@@ -26,7 +26,6 @@ declare(strict_types=1);
 namespace OCA\WorkflowEngine\Migration;
 
 use Doctrine\DBAL\Driver\Statement;
-use OCA\WorkflowEngine\Entity\File;
 use OCP\IDBConnection;
 use OCP\Migration\IOutput;
 use OCP\Migration\IRepairStep;
@@ -51,17 +50,6 @@ class PopulateNewlyIntroducedDatabaseFields implements IRepairStep {
                $this->populateScopeTable($result);
 
                $result->closeCursor();
-
-               $this->populateEntityCol();
-       }
-
-       protected function populateEntityCol() {
-               $qb = $this->dbc->getQueryBuilder();
-
-               $qb->update('flow_operations')
-                       ->set('entity', $qb->createNamedParameter(File::class))
-                       ->where($qb->expr()->emptyString('entity'))
-                       ->execute();
        }
 
        protected function populateScopeTable(Statement $ids): void {
index fae4fda5bc3496dddb167f593eef442704337a7a..58458e84c86d04e9392d2778262abaf594feecf9 100644 (file)
@@ -7,6 +7,7 @@ namespace OCA\WorkflowEngine\Migration;
 use Closure;
 use Doctrine\DBAL\Schema\Table;
 use Doctrine\DBAL\Types\Types;
+use OCA\WorkflowEngine\Entity\File;
 use OCP\DB\ISchemaWrapper;
 use OCP\Migration\IOutput;
 use OCP\Migration\SimpleMigrationStep;
@@ -116,7 +117,7 @@ class Version2000Date20190808074233 extends SimpleMigrationStep {
                        $table->addColumn('entity', Types::STRING, [
                                'notnull' => true,
                                'length' => 256,
-                               'default' => '',
+                               'default' => File::class,
                        ]);
                }
                if (!$table->hasColumn('events')) {