fix(db): Table::getPrimaryKeyColumns() was removed

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-07-01 12:33:37 +02:00
parent f45ac5bb68
commit 72151b550c
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205

View file

@ -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();
}