You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 12.12.0 we can't add a field and update the field in the same migration anymore. Running into this issue when running pest which runs the migrations on an sqlite database.
SQLSTATE[HY000]: General error: 1 no such column: has_non_mappable_coverage (Connection: sqlite, SQL: update "policies" set "has_non_mappable_coverage" = 0, "updated_at" = 2025-05-08 13:42:04 where "has_non_mappable_coverage" is null and "policies"."deleted_at" is null)
Does still work with 12.11.1
<?php
use App\Models\Policy;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table('policies', function (Blueprint $table) {
$table->boolean('has_non_mappable_coverage')->nullable()->default(0);
});
Policy::where('has_non_mappable_coverage', null)->update(['has_non_mappable_coverage' => false]);
}
public function down()
{
....
}
};
Steps To Reproduce
Updating a field in the same migration where it's created and running the migrations or pest.
Laravel Version
12.13.0
PHP Version
8.3
Database Driver & Version
sqlite
Description
Since 12.12.0 we can't add a field and update the field in the same migration anymore. Running into this issue when running pest which runs the migrations on an sqlite database.
SQLSTATE[HY000]: General error: 1 no such column: has_non_mappable_coverage (Connection: sqlite, SQL: update "policies" set "has_non_mappable_coverage" = 0, "updated_at" = 2025-05-08 13:42:04 where "has_non_mappable_coverage" is null and "policies"."deleted_at" is null)
Does still work with 12.11.1
Steps To Reproduce
Updating a field in the same migration where it's created and running the migrations or pest.
Caused by making the resolver static in: #55607
The text was updated successfully, but these errors were encountered: