<?php

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

class AddColumnMstTownTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('mst_towns', function (Blueprint $table){
            $table->string('chome_name')->after('name2')->nullable()->collation('utf8mb4_unicode_ci');
            $table->string('koaza_name')->after('chome_name')->nullable()->collation('utf8mb4_unicode_ci');
            $table->integer('town_class_code')->after('code')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('mst_towns', function (Blueprint $table){
            $table->dropColumn('chome_name');
            $table->dropColumn('koaza_name');
            $table->dropColumn('town_class_code');
        });

    }
}
