summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-04-29 16:08:26 +0200
committerJoas Schilling <coding@schilljs.com>2019-04-30 12:08:52 +0200
commitb3e6cbc4c5eb02e2de3b496ea08166dcca03b2fe (patch)
tree29285c8bd079e3b4fbc9789fd12c705ebddb150d /lib/private/DB
parent01410491b982a9ed5fffe1adf63ee8c00f565d5b (diff)
downloadnextcloud-server-b3e6cbc4c5eb02e2de3b496ea08166dcca03b2fe.tar.gz
nextcloud-server-b3e6cbc4c5eb02e2de3b496ea08166dcca03b2fe.zip
Remove the custom prefix from the table name length when checking on the default primary index
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r--lib/private/DB/MigrationService.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php
index d26337990d1..269400c3ba9 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.');
}
}