Always order by all values, to make sure all entries are copied correctly
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
1b7c1ad5c0
commit
e023899078
1 changed files with 4 additions and 9 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue