From 191cc74386b04efe9f691d30d142f66384a3f266 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sun, 3 Jun 2018 13:32:49 +0200 Subject: Add parent index to share table Fixes #9327 Signed-off-by: Roeland Jago Douma --- core/Command/Db/AddMissingIndices.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'core/Command') 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('Adding additional index to the share table, this can take some time...'); + $output->writeln('Adding additional share_with index to the share table, this can take some time...'); $table->addIndex(['share_with'], 'share_with_index'); $this->connection->migrateToSchema($schema->getWrappedSchema()); $updated = true; $output->writeln('Share table updated successfully.'); } + + if (!$table->hasIndex('parent_index')) { + $output->writeln('Adding additional parent index to the share table, this can take some time...'); + $table->addIndex(['parent'], 'parent_index'); + $this->connection->migrateToSchema($schema->getWrappedSchema()); + $updated = true; + $output->writeln('Share table updated successfully.'); + } } if (!$updated) { -- cgit v1.2.3