summaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-06-03 13:32:49 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-12 21:09:20 +0200
commit191cc74386b04efe9f691d30d142f66384a3f266 (patch)
treef69c6af6960ce7782fef1b844e848118958ea81e /core/Command
parent59a27ceb13b1b6d0e2ba75f921e16141a7c28623 (diff)
downloadnextcloud-server-191cc74386b04efe9f691d30d142f66384a3f266.tar.gz
nextcloud-server-191cc74386b04efe9f691d30d142f66384a3f266.zip
Add parent index to share table
Fixes #9327 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Db/AddMissingIndices.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php
index c80b0ba8b8e..ad6962ce06d 100644
--- a/core/Command/Db/AddMissingIndices.php
+++ b/core/Command/Db/AddMissingIndices.php
@@ -83,12 +83,20 @@ class AddMissingIndices extends Command {
if ($schema->hasTable('share')) {
$table = $schema->getTable('share');
if (!$table->hasIndex('share_with_index')) {
- $output->writeln('<info>Adding additional index to the share table, this can take some time...</info>');
+ $output->writeln('<info>Adding additional share_with index to the share table, this can take some time...</info>');
$table->addIndex(['share_with'], 'share_with_index');
$this->connection->migrateToSchema($schema->getWrappedSchema());
$updated = true;
$output->writeln('<info>Share table updated successfully.</info>');
}
+
+ if (!$table->hasIndex('parent_index')) {
+ $output->writeln('<info>Adding additional parent index to the share table, this can take some time...</info>');
+ $table->addIndex(['parent'], 'parent_index');
+ $this->connection->migrateToSchema($schema->getWrappedSchema());
+ $updated = true;
+ $output->writeln('<info>Share table updated successfully.</info>');
+ }
}
if (!$updated) {