<?php

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

class CreateMstPrefectures extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mst_prefectures', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('code')->default(0); // 都道府県番号(value)
            $table->text('name'); // 都道府県名(name)
        });
        DB::statement("ALTER TABLE mst_prefectures COMMENT 'マスタ：都道府県'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mst_prefectures');
    }
}
