fix(mounts): only remove existing index

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2026-01-15 16:13:12 -01:00 committed by backportbot[bot]
parent 5d4ff58c3c
commit 9c53ae23d6

View file

@ -39,7 +39,9 @@ class Version33000Date20251209123503 extends SimpleMigrationStep {
'notnull' => true,
'length' => 32, // xxh128
]);
$table->dropIndex('mounts_user_root_path_index');
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');
return $schema;
}