migrationファイルによるカラム修正

<?php

use Illuminate\Support\Facades\Schema\;
use Illuminate\Database\Schema\Blueprint\;
use Innuminate\Database\Migrations\Migration;

class AddColumnSalesHogeTable extends Migration{

	public function up(){
		Schema::table('books', function(Blueprint $table){
			$table->integer('sales')->default(0)->index('index_sales')->after('price')->comment('販売数');
		});
	}

	public function down()
	{
		Schema::table('books', function(Blueprint $table){
			$table->dropColumn('sales');
		});
	}
}