diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-11-24 19:40:14 +0300 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-11-24 19:40:14 +0300 |
commit | 48608db9be01cce1262a112f9c9cf34b13ff7da1 (patch) | |
tree | 7d62dde3c80d468c6db198fe24b687b456383837 | |
parent | adcb73d8f601cdda7749b672546b2fc6c4c9b844 (diff) |
avoid empty null default with value that will be inserted anyways
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-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 f715ebc7ef7..1f7baac9930 100644 --- a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php +++ b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php @@ -25,7 +25,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 { $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 787cd06bfa1..53196f7b52d 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\Type; +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', Type::STRING, [ 'notnull' => true, 'length' => 256, - 'default' => '', + 'default' => File::class, ]); } if(!$table->hasColumn('events')) { |