Skip to content

Commit 8c257de

Browse files
ArtificialOwlprovokateurin
authored andcommitted
fix(mounts): only remove existing index
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 parent 2c76338 commit 8c257de

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/Migrations/Version33000Date20251209123503.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
3939
'notnull' => true,
4040
'length' => 32, // xxh128
4141
]);
42-
$table->dropIndex('mounts_user_root_path_index');
42+
if ($table->hasIndex('mounts_user_root_path_index')) {
43+
$table->dropIndex('mounts_user_root_path_index');
44+
}
4345
$table->addUniqueIndex(['user_id', 'root_id', 'mount_point_hash'], 'mounts_user_root_path_index');
4446
return $schema;
4547
}

0 commit comments

Comments
 (0)