]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove the custom prefix from the table name length when checking on the default... 15312/head
authorJoas Schilling <coding@schilljs.com>
Mon, 29 Apr 2019 14:08:26 +0000 (16:08 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Tue, 30 Apr 2019 12:20:31 +0000 (12:20 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/DB/MigrationService.php

index d26337990d10b3ac80061e7a1faaddf129005bb5..269400c3ba90df1ca607d7fdcc1c1b1c0f59551f 100644 (file)
@@ -547,7 +547,7 @@ class MigrationService {
                                if (!$isUsingDefaultName && \strlen($indexName) > 30) {
                                        throw new \InvalidArgumentException('Primary index name  on "'  . $table->getName() . '" is too long.');
                                }
-                               if ($isUsingDefaultName && \strlen($table->getName()) > 26) {
+                               if ($isUsingDefaultName && \strlen($table->getName()) - $prefixLength > 23) {
                                        throw new \InvalidArgumentException('Primary index name  on "'  . $table->getName() . '" is too long.');
                                }
                        }