How to make migration flexable in laravel ??
Posted: Sun Jan 01, 2017 9:18 am
Hey guys i have the following migration file in my laravel app as of now:
Every now and then i have to add a new property to the migration ... how do i make this migration flexable ?? I.E. Say i want to add the following property to the above migration:
How do i do it ?? without loosing my earlier data and my earlier migration ??
Thank you.
Gautam.
Code: Select all
class QualityCheckTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('quality_check', function (Blueprint $table) {
$table->increments('id');
$table->text('site-name');
$table->boolean('favicon');
$table->boolean('title');
$table->boolean('image-optimization');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('quality_check');
}
}
Code: Select all
$table->boolean('favicon');Thank you.
Gautam.