diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-11-26 14:50:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 14:50:27 +0100 |
commit | 61f1c12fb102ed4aedbccfe19ffd15e40260cbaa (patch) | |
tree | d2ff1c3ed828353cd2cf67e4dafdee7787890d3d | |
parent | 921f9441d3b4b7acb9392870583323bd1bcb3add (diff) | |
parent | 4850019fcd65ddf5b1db620a657a1403afe4a704 (diff) | |
download | nextcloud-server-61f1c12fb102ed4aedbccfe19ffd15e40260cbaa.tar.gz nextcloud-server-61f1c12fb102ed4aedbccfe19ffd15e40260cbaa.zip |
Merge pull request #24333 from nextcloud/backport/24315/stable20
[stable20] avoid empty null default with value that will be inserted anyways
-rw-r--r-- | apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php | 12 | ||||
-rw-r--r-- | apps/workflowengine/lib/Migration/Version2000Date20190808074233.php | 3 |
2 files changed, 2 insertions, 13 deletions
diff --git a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php index 6f344c2ee2d..50b38f81993 100644 --- a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php +++ b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php @@ -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 { diff --git a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php index fae4fda5bc3..58458e84c86 100644 --- a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php +++ b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php @@ -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')) { |