<?php

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

class AdjustColumnUserInfos extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user_infos', function (Blueprint $table){
            $table->dropColumn('question1');
            $table->dropColumn('question2');
            $table->dropColumn('question3');
            $table->dropColumn('question4');
            $table->dropColumn('question1_file');
            $table->dropColumn('question2_file');
            $table->dropColumn('question3_file');
            $table->dropColumn('question4_file');
        });

        Schema::table('relation_custom_items', function (Blueprint $table){
            $table->string('file_path')->nullable();
        });
    }

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