diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-11-23 21:17:37 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-11-24 17:32:03 +0100 |
commit | 52f32115e750191e8d13dfc6951ee86513a1b98f (patch) | |
tree | cf23825f4c9e8e06bbac9292357c1acd414592ad /apps | |
parent | e99d6b4dad305214b7a12114e592f37e9f78957e (diff) | |
download | nextcloud-server-52f32115e750191e8d13dfc6951ee86513a1b98f.tar.gz nextcloud-server-52f32115e750191e8d13dfc6951ee86513a1b98f.zip |
avoid empty null default with value that will be inserted anyways
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-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 cfbd852d49f..576d23de07e 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')) { |