diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index 6e20acf254b2d..15b447b0827c4 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -340,14 +340,11 @@ protected function copyTable(Connection $fromDB, Connection $toDB, Table $table, try { $orderColumns = $table->getPrimaryKeyColumns(); } catch (Exception $e) { - $orderColumns = []; - foreach ($table->getColumns() as $column) { - $orderColumns[] = $column->getName(); - } + $orderColumns = $table->getColumns(); } foreach ($orderColumns as $column) { - $query->addOrderBy($column); + $query->addOrderBy($column->getName()); } $insertQuery = $toDB->getQueryBuilder();