Skip to content

Commit

Permalink
Merge pull request #27446 from nextcloud/backport/27429/stable21
Browse files Browse the repository at this point in the history
[stable21] Don't pass a column object to addOrderBy
  • Loading branch information
MorrisJobke authored Jun 10, 2021
2 parents 7c5f2e6 + 7259259 commit f627f38
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/Command/Db/ConvertType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f627f38

Please sign in to comment.