Skip to content

Commit 9beecd8

Browse files
committed
fix sqlite
1 parent 9f5a967 commit 9beecd8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

database/migrations_v2/2018_11_19_164609_update_transactions_table.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Database\Schema\Blueprint;
77
use Illuminate\Support\Facades\DB;
88
use Illuminate\Support\Facades\Schema;
9+
use Illuminate\Database\SQLiteConnection;
910

1011
class UpdateTransactionsTable extends Migration
1112
{
@@ -59,7 +60,9 @@ public function up(): void
5960
public function down(): void
6061
{
6162
Schema::table($this->table(), function (Blueprint $table) {
62-
$table->dropForeign(['wallet_id']);
63+
if (!(DB::connection() instanceof SQLiteConnection)) {
64+
$table->dropForeign(['wallet_id']);
65+
}
6366
$table->dropColumn('wallet_id');
6467
});
6568
}

0 commit comments

Comments
 (0)