Merge pull request #57579 from nextcloud/fix/57572/remove-only-existing-index

fix(mounts): only remove existing index
This commit is contained in:
Joas Schilling 2026-01-15 23:14:51 +01:00 committed by GitHub
commit 80c16e76be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;
}