From be5cc3a9730e36802295abb8dfd70918eb2bc2ff Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 29 Apr 2019 16:08:26 +0200 Subject: [PATCH] Remove the custom prefix from the table name length when checking on the default primary index Signed-off-by: Joas Schilling --- lib/private/DB/MigrationService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index d26337990d..269400c3ba 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -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.'); } }