mardi 4 avril 2017

Updating columns with migration Laravel 5.4

I have a running application, I see a field in a form is not required and can be left empty. but by the migrations, that field in database is set to be "not null". I wanted to to change it so I did it by checking Null. But how I do the same thing with migrations?? I read documentation and created this

public function up()
{
   Scheme::table('modules', function (Blueprint $table) {
       $table->text('content')->nullable();
   });
}

but when I run migration, it give me error table already exists (obviously, because other migration files are there). How should I do it to achieve my target.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire