Database/Migrations/2015_05_29_180714_add_status_column_to_post_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddStatusColumnToPostTable extends Migration
{
/**
* Run the migrations.
* @return void
*/
public function up()
{
Schema::table('blog__posts', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->integer('status')->after('category_id')->default(1);
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::table('blog__posts', function (Blueprint $table) {
$table->dropColumn('status');
});
}
}