Switch from deprecated hasPrimaryKey to getPrimaryKey function

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/41460/head
Côme Chilliet 7 months ago committed by Côme Chilliet
parent 1b547c7db8
commit a0e365f6d2

@ -62,7 +62,7 @@ class DatabaseHasMissingPrimaryKeys implements ISetupCheck {
foreach ($missingPrimaryKeys as $missingPrimaryKey) {
if ($schema->hasTable($missingPrimaryKey['tableName'])) {
$table = $schema->getTable($missingPrimaryKey['tableName']);
if (!$table->hasPrimaryKey()) {
if ($table->getPrimaryKey() === null) {
$primaryKeyInfo->addHintForMissingPrimaryKey($missingPrimaryKey['tableName']);
}
}

Loading…
Cancel
Save