summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Command/Db/ConvertType.php13
1 files changed, 4 insertions, 9 deletions
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();