diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-01 23:59:36 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-01 23:59:36 +0200 |
commit | b82cbe04df59805e50d3762e6205c777aeff90a9 (patch) | |
tree | 8aefc7f58392767cd05b1bc1de82d0b4e745e885 /core/Command/Db | |
parent | 28eaacd59fe67dda6ec7686dabecabff3bedae0f (diff) | |
download | nextcloud-server-b82cbe04df59805e50d3762e6205c777aeff90a9.tar.gz nextcloud-server-b82cbe04df59805e50d3762e6205c777aeff90a9.zip |
Add uid_owner and uid_initiator share tabe indices
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/Command/Db')
-rw-r--r-- | core/Command/Db/AddMissingIndices.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php index 5d78d360b49..c2068b36915 100644 --- a/core/Command/Db/AddMissingIndices.php +++ b/core/Command/Db/AddMissingIndices.php @@ -98,6 +98,22 @@ class AddMissingIndices extends Command { $updated = true; $output->writeln('<info>Share table updated successfully.</info>'); } + + if (!$table->hasIndex('uid_owner')) { + $output->writeln('<info>Adding additional owner index to the share table, this can take some time...</info>'); + $table->addIndex(['uid_owner'], 'owner_index'); + $this->connection->migrateToSchema($schema->getWrappedSchema()); + $updated = true; + $output->writeln('<info>Share table updated successfully.</info>'); + } + + if (!$table->hasIndex('uid_initiator')) { + $output->writeln('<info>Adding additional initiator index to the share table, this can take some time...</info>'); + $table->addIndex(['uid_initiator'], 'initiator_index'); + $this->connection->migrateToSchema($schema->getWrappedSchema()); + $updated = true; + $output->writeln('<info>Share table updated successfully.</info>'); + } } if ($schema->hasTable('filecache')) { |