diff options
author | Robin Appelman <robin@icewind.nl> | 2023-04-13 17:19:26 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-04-28 15:08:08 +0200 |
commit | db43d903877a8b90b78cafb404b1e7101bfb2c15 (patch) | |
tree | ca3d18310a9418cee5368550ad2e42085206fa9d /core/Command | |
parent | f5e2b0b22f51cdb67c06c368e921052d25aacc2e (diff) | |
download | nextcloud-server-db43d903877a8b90b78cafb404b1e7101bfb2c15.tar.gz nextcloud-server-db43d903877a8b90b78cafb404b1e7101bfb2c15.zip |
add new index in repair step instead of on-migrate
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Db/AddMissingIndices.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php index e22d0fddeca..b317f44b499 100644 --- a/core/Command/Db/AddMissingIndices.php +++ b/core/Command/Db/AddMissingIndices.php @@ -465,6 +465,14 @@ class AddMissingIndices extends Command { $updated = true; $output->writeln('<info>oc_mounts table updated successfully.</info>'); } + if (!$table->hasIndex('mounts_user_root_path_index')) { + $output->writeln('<info>Adding mounts_user_root_path_index index to the oc_mounts table, this can take some time...</info>'); + + $table->addIndex(['user_id', 'root_id', 'mount_point'], 'mounts_user_root_path_index', [], ['lengths' => [null, null, 128]]); + $this->connection->migrateToSchema($schema->getWrappedSchema()); + $updated = true; + $output->writeln('<info>oc_mounts table updated successfully.</info>'); + } } if (!$updated) { |