mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #31887 from nextcloud/techdebt/noid/log-primary-key-violation
Log missing primary key until we make it a requirement
This commit is contained in:
commit
88e5c0792a
1 changed files with 4 additions and 1 deletions
|
|
@ -652,7 +652,10 @@ class MigrationService {
|
|||
if ($isUsingDefaultName && \strlen($table->getName()) - $prefixLength >= 23) {
|
||||
throw new \InvalidArgumentException('Primary index name on "' . $table->getName() . '" is too long.');
|
||||
}
|
||||
// } elseif (!$primaryKey instanceof Index && !$sourceTable instanceof Table) {
|
||||
} elseif (!$primaryKey instanceof Index && !$sourceTable instanceof Table) {
|
||||
/** @var LoggerInterface $logger */
|
||||
$logger = \OC::$server->get(LoggerInterface::class);
|
||||
$logger->error('Table "' . $table->getName() . '" has no primary key and therefor will not behave sane in clustered setups. This will throw an exception and not be installable in a future version of Nextcloud.');
|
||||
// throw new \InvalidArgumentException('Table "' . $table->getName() . '" has no primary key and therefor will not behave sane in clustered setups.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue