summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-04 15:39:51 +0200
committerGitHub <noreply@github.com>2018-06-04 15:39:51 +0200
commit2d2c9ec8db9acb54b29abc5c53baf951f58e4f09 (patch)
tree3ac28fa7cf2f8ee68482046fa4b31c98f40c2e36 /core
parent2794d62f6088dd69a9e056825f31e326d599ea31 (diff)
parent2f59f389d2dc5bd701883f8c27b20a6bfc420519 (diff)
downloadnextcloud-server-2d2c9ec8db9acb54b29abc5c53baf951f58e4f09.tar.gz
nextcloud-server-2d2c9ec8db9acb54b29abc5c53baf951f58e4f09.zip
Merge pull request #9724 from nextcloud/feature/9327/parent_share_index
Add parent index to share table
Diffstat (limited to 'core')
-rw-r--r--core/Command/Db/AddMissingIndices.php10
-rw-r--r--core/Migrations/Version13000Date20170718121200.php1
2 files changed, 10 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) {
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php
index 139129eb600..05623e435c3 100644
--- a/core/Migrations/Version13000Date20170718121200.php
+++ b/core/Migrations/Version13000Date20170718121200.php
@@ -401,6 +401,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
$table->addIndex(['file_source'], 'file_source_index');
$table->addIndex(['token'], 'token_index');
$table->addIndex(['share_with'], 'share_with_index');
+ $table->addIndex(['parent'], 'parent_index');
}
if (!$schema->hasTable('jobs')) {