diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index 961f294e40e..2d4cf4f9af6 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -9,6 +9,7 @@ namespace OC\Core\Command\Db; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Schema\AbstractAsset; +use Doctrine\DBAL\Schema\Index; use Doctrine\DBAL\Schema\Table; use OC\DB\Connection; use OC\DB\ConnectionFactory; @@ -302,7 +303,12 @@ class ConvertType extends Command implements CompletionAwareInterface { ->setMaxResults($chunkSize); try { - $orderColumns = $table->getPrimaryKeyColumns(); + $key = $table->getPrimaryKey(); + if ($key instanceof Index) { + $orderColumns = $key->getColumns(); + } else { + $orderColumns = $table->getColumns(); + } } catch (Exception $e) { $orderColumns = $table->getColumns(); }