From e023899078d66084feb6982a347c4d28dac09192 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 19 Jul 2017 13:20:24 +0200 Subject: Always order by all values, to make sure all entries are copied correctly Signed-off-by: Joas Schilling --- core/Command/Db/ConvertType.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'core/Command/Db') diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index cccba47b4ee..81b2988b9d0 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -324,18 +324,13 @@ class ConvertType extends Command implements CompletionAwareInterface { $orderColumns = $table->getPrimaryKeyColumns(); } catch (DBALException $e) { $orderColumns = []; - } - foreach ($table->getIndexes() as $index) { - if ($index->isUnique()) { - $orderColumns = array_merge($orderColumns, $index->getUnquotedColumns()); + foreach ($table->getColumns() as $column) { + $orderColumns[] = $column->getName(); } } - $orderColumns = array_unique($orderColumns); - if (!empty($orderColumns)) { - foreach ($orderColumns as $column) { - $query->addOrderBy($column); - } + foreach ($orderColumns as $column) { + $query->addOrderBy($column); } $insertQuery = $toDB->getQueryBuilder(); -- cgit v1.2.3