]> source.dussan.org Git - nextcloud-server.git/commitdiff
Switch from deprecated hasPrimaryKey to getPrimaryKey function
authorCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 14 Nov 2023 15:19:16 +0000 (16:19 +0100)
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>
Mon, 27 Nov 2023 14:23:52 +0000 (15:23 +0100)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/settings/lib/SetupChecks/DatabaseHasMissingPrimaryKeys.php

index ca872fa265cae8cbcaf8f2c14b00d70ab55ae8e4..9609fe117bb2e74d49b6760f1b9942367124b2ce 100644 (file)
@@ -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']);
                                        }
                                }