Sets the default value for the reserved column to 0 (instead of null)

Fixes the error "Cannot add a NOT NULL column with default value NULL"
This commit is contained in:
Paul Vogel
2021-03-31 14:59:22 +02:00
committed by GitHub
parent 275315972f
commit b76559274e

View File

@@ -35,7 +35,7 @@ class AlterJobsDropReserved extends Migration
public function down()
{
Schema::table('jobs', function (Blueprint $table) {
$table->tinyInteger('reserved')->unsigned()->after('attempts');
$table->tinyInteger('reserved')->unsigned()->default(0)->after('attempts');
});
}
}