mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 10:40:40 -04:00
fix(db)!: Doctrine\DBAL\Schema\Table::hasPrimaryKey() was removed, use Table::getPrimaryKey` instead.
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
27c49e7a9a
commit
466f455e93
2 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ class AddMissingPrimaryKeys extends Command {
|
|||
foreach ($missingKeys as $missingKey) {
|
||||
if ($schema->hasTable($missingKey['tableName'])) {
|
||||
$table = $schema->getTable($missingKey['tableName']);
|
||||
if (!$table->hasPrimaryKey()) {
|
||||
if (!$table->getPrimaryKey()) {
|
||||
$output->writeln('<info>Adding primary key to the ' . $missingKey['tableName'] . ' table, this can take some time...</info>');
|
||||
$table->setPrimaryKey($missingKey['columns'], $missingKey['primaryKeyName']);
|
||||
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ class MigrationService {
|
|||
}
|
||||
|
||||
$primaryKey = $table->getPrimaryKey();
|
||||
if ($primaryKey instanceof Index && (!$sourceTable instanceof Table || !$sourceTable->hasPrimaryKey())) {
|
||||
if ($primaryKey instanceof Index && (!$sourceTable instanceof Table || !$sourceTable->getPrimaryKey())) {
|
||||
$indexName = strtolower($primaryKey->getName());
|
||||
$isUsingDefaultName = $indexName === 'primary';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue