diff options
author | Louis Chemineau <louis@chmn.me> | 2023-02-15 15:57:44 +0100 |
---|---|---|
committer | Simon L. (Rebase PR Action) <szaimen@e.mail.de> | 2023-03-20 15:02:23 +0000 |
commit | bda66f9fb655df2da674778109251585f9f51a22 (patch) | |
tree | 702152fb23137574e10a5d8535a4501f16e6f7a9 /core/Command | |
parent | a3ca6be4d1b80e358c6b42d271f61d7b328897a3 (diff) | |
download | nextcloud-server-bda66f9fb655df2da674778109251585f9f51a22.tar.gz nextcloud-server-bda66f9fb655df2da674778109251585f9f51a22.zip |
Add parent index on filecache
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Db/AddMissingIndices.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php index 5799a462ffa..e22d0fddeca 100644 --- a/core/Command/Db/AddMissingIndices.php +++ b/core/Command/Db/AddMissingIndices.php @@ -182,6 +182,16 @@ class AddMissingIndices extends Command { $updated = true; $output->writeln('<info>Filecache table updated successfully.</info>'); } + if (!$table->hasIndex('fs_parent')) { + $output->writeln('<info>Adding additional parent index to the filecache table, this can take some time...</info>'); + $table->addIndex(['parent'], 'fs_parent'); + $sqlQueries = $this->connection->migrateToSchema($schema->getWrappedSchema(), $dryRun); + if ($dryRun && $sqlQueries !== null) { + $output->writeln($sqlQueries); + } + $updated = true; + $output->writeln('<info>Filecache table updated successfully.</info>'); + } } $output->writeln('<info>Check indices of the twofactor_providers table.</info>'); |