Skip to content

Commit

Permalink
Sets the default value for the reserved column to 0 (instead of null)
Browse files Browse the repository at this point in the history
Fixes the error "Cannot add a NOT NULL column with default value NULL"
  • Loading branch information
pavog committed Mar 31, 2021
1 parent 2753159 commit b765592
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function up()
public function down()
{
Schema::table('jobs', function (Blueprint $table) {
$table->tinyInteger('reserved')->unsigned()->after('attempts');
$table->tinyInteger('reserved')->unsigned()->default(0)->after('attempts');
});
}
}

0 comments on commit b765592

Please sign in to comment.