mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix(db): Table::getPrimaryKeyColumns() was removed
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
f45ac5bb68
commit
72151b550c
1 changed files with 7 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue