Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2018-06-19 17:02:13 +0300
committerGitHub <noreply@github.com>2018-06-19 17:02:13 +0300
commit6a29c408e54efd069567b152e141c9939c6d290c (patch)
treef566c0df942db8be2fdecd75cc37ce5849c896b1 /core
parent54bc862c9de0fc17051f33be5f39d4fa3ed3d220 (diff)
parent191cc74386b04efe9f691d30d142f66384a3f266 (diff)
Merge pull request #9843 from nextcloud/backport/9724/stable13
[stable13] 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 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) {
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')) {