Skip to content

Commit 4d43b87

Browse files
authored
Support v4
1 parent dc5c1b2 commit 4d43b87

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

database/migrations/2025_12_19_220555_drop_currency_foreign_key_from_invoices_table.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
public function up(): void
1313
{
1414
Schema::table('invoices', function (Blueprint $table) {
15-
$table->dropForeign(['currency_id']);
15+
if (Schema::hasIndex('invoices', 'invoices_currency_id_foreign')){
16+
$table->dropForeign(['currency_id']);
17+
}
1618
});
1719
}
1820

0 commit comments

Comments
 (0)