<?php

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

class AddStationToArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('articles', function (Blueprint $table) {
            $table->integer('sub_traffic3')->nullable();
            $table->string('sub_traffic3_line')->nullable();
            $table->integer('sub_traffic3_line_id')->nullable();
            $table->string('sub_traffic3_station')->nullable();
            $table->integer('sub_traffic3_station_id')->nullable();
            $table->integer('sub_traffic3_time')->nullable();
            $table->integer('sub_traffic3_bus_time')->nullable();
            $table->string('sub_traffic3_bus')->nullable();
            $table->integer('sub_traffic3_bus_walk')->nullable();

            $table->integer('sub_traffic4')->nullable();
            $table->string('sub_traffic4_line')->nullable();
            $table->integer('sub_traffic4_line_id')->nullable();
            $table->string('sub_traffic4_station')->nullable();
            $table->integer('sub_traffic4_station_id')->nullable();
            $table->integer('sub_traffic4_time')->nullable();
            $table->integer('sub_traffic4_bus_time')->nullable();
            $table->string('sub_traffic4_bus')->nullable();
            $table->integer('sub_traffic4_bus_walk')->nullable();

            $table->integer('sub_traffic5')->nullable();
            $table->string('sub_traffic5_line')->nullable();
            $table->integer('sub_traffic5_line_id')->nullable();
            $table->string('sub_traffic5_station')->nullable();
            $table->integer('sub_traffic5_station_id')->nullable();
            $table->integer('sub_traffic5_time')->nullable();
            $table->integer('sub_traffic5_bus_time')->nullable();
            $table->string('sub_traffic5_bus')->nullable();
            $table->integer('sub_traffic5_bus_walk')->nullable();

            $table->longText('build_note')->nullable();
            $table->longText('land_note')->nullable();
        });
    }
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('articles', function (Blueprint $table) {
            $table->dropColumn('sub_traffic3');
            $table->dropColumn('sub_traffic3_line');
            $table->dropColumn('sub_traffic3_line_id');
            $table->dropColumn('sub_traffic3_station');
            $table->dropColumn('sub_traffic3_station_id');
            $table->dropColumn('sub_traffic3_time');
            $table->dropColumn('sub_traffic3_bus_time');
            $table->dropColumn('sub_traffic3_bus');
            $table->dropColumn('sub_traffic3_bus_walk');

            $table->dropColumn('sub_traffic4');
            $table->dropColumn('sub_traffic4_line');
            $table->dropColumn('sub_traffic4_line_id');
            $table->dropColumn('sub_traffic4_station');
            $table->dropColumn('sub_traffic4_station_id');
            $table->dropColumn('sub_traffic4_time');
            $table->dropColumn('sub_traffic4_bus_time');
            $table->dropColumn('sub_traffic4_bus');
            $table->dropColumn('sub_traffic4_bus_walk');

            $table->dropColumn('sub_traffic5');
            $table->dropColumn('sub_traffic5_line');
            $table->dropColumn('sub_traffic5_line_id');
            $table->dropColumn('sub_traffic5_station');
            $table->dropColumn('sub_traffic5_station_id');
            $table->dropColumn('sub_traffic5_time');
            $table->dropColumn('sub_traffic5_bus_time');
            $table->dropColumn('sub_traffic5_bus');
            $table->dropColumn('sub_traffic5_bus_walk');

            $table->dropColumn('build_note');
            $table->dropColumn('land_note');
        });
    }
}
