I\'m using laravel 5.2 and I usually update my database according to project requirements, so I\'d like to do it without losing database records. I don\'t mean how to seed my da
Make a new migration with
php artisan make:migration change_body_to_nullable_in_reviews_table --table=reviews
where you put this
public function up()
{
Schema::table('reviews', function (Blueprint $table) {
$table->text('body')->nullable()->change();
});
}
public function down()
{
Schema::table('reviews', function (Blueprint $table) {
$table->text('body')->nullable(false)->change();
});
}
And then run PHP artisan migrate