I\'m writing a migration to make certain columns in a table nullable
right now. For the down function, I of course want to make those columns not nullable
You can just declare the column again without ->nullable() and use ->change
public function up()
{
Schema::table('table_name', function (Blueprint $table) {
$table->type('column')->change();
});
}
public function down()
{
Schema::table('table_name', function ($table) {
$table->type('column')->nullable()->change();
});
}