summaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-07-19 13:20:24 +0200
committerJoas Schilling <coding@schilljs.com>2017-07-25 12:49:15 +0200
commite023899078d66084feb6982a347c4d28dac09192 (patch)
tree0115e3f6dda155bbf71f6c1503ebb6e4653c660a /core/Command
parent1b7c1ad5c0c3b28efdfbbc0f4e8730dda9963317 (diff)
downloadnextcloud-server-e023899078d66084feb6982a347c4d28dac09192.tar.gz
nextcloud-server-e023899078d66084feb6982a347c4d28dac09192.zip
Always order by all values, to make sure all entries are copied correctly
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command')
-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();