diff options
author | Joas Schilling <coding@schilljs.com> | 2022-04-08 10:47:24 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-04-08 10:47:24 +0200 |
commit | df36ed4d1ad153b9bd30b799c35a4b6421126c70 (patch) | |
tree | 0ffc5efadec6f4286afb11623bfcfb107a2077c0 /lib | |
parent | 69378e15347630cdf4c3c7465a951857926e52ec (diff) | |
download | nextcloud-server-df36ed4d1ad153b9bd30b799c35a4b6421126c70.tar.gz nextcloud-server-df36ed4d1ad153b9bd30b799c35a4b6421126c70.zip |
Log missing primary key until we make it a requirement
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/DB/MigrationService.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 92f45dfdbe8..13bbe8dc5d0 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -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.'); } } |