summaryrefslogtreecommitdiffstats
path: root/core/Command/Db/AddMissingIndices.php
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-03 13:36:02 +0200
commit2f59f389d2dc5bd701883f8c27b20a6bfc420519 (patch)
treeefffa478a9f5275709521e3db1d85f0daa4a3df0 /core/Command/Db/AddMissingIndices.php
parentd9238b810a5a01bc229644d06b412025bbaee03d (diff)
downloadnextcloud-server-2f59f389d2dc5bd701883f8c27b20a6bfc420519.tar.gz
nextcloud-server-2f59f389d2dc5bd701883f8c27b20a6bfc420519.zip
Add parent index to share table
Fixes #9327 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/Command/Db/AddMissingIndices.php')
-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 82099759366..b30fa43ab39 100644
--- a/core/Command/Db/AddMissingIndices.php
+++ b/core/Command/Db/AddMissingIndices.php
@@ -84,12 +84,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) {