Skip to content

Commit

Permalink
Excluding primary key deletion for tests using SQLite
Browse files Browse the repository at this point in the history
Not working with Laravel 11:
- laravel/framework#51318
- laravel/framework#51373
  • Loading branch information
Simounet committed May 28, 2024
1 parent 9e2f7d2 commit cb06098
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public function up(): void

Schema::table('settings', function (Blueprint $table) {
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->dropColumn('id');
if(Db::getDriverName() !== 'sqlite') {
$table->dropColumn('id');
}
});
}

Expand Down

0 comments on commit cb06098

Please sign in to comment.