perf: swap around root_id and mount_path_hash in index for old migration

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2026-04-22 18:02:15 +02:00
parent 4b7a94343e
commit 09364c2e93
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -42,7 +42,7 @@ class Version33000Date20251209123503 extends SimpleMigrationStep {
if ($table->hasIndex('mounts_user_root_path_index')) {
$table->dropIndex('mounts_user_root_path_index');
}
$table->addUniqueIndex(['user_id', 'root_id', 'mount_point_hash'], 'mounts_user_root_path_index');
$table->addUniqueIndex(['user_id', 'mount_point_hash', 'root_id'], 'mounts_user_path_root_index');
return $schema;
}