<?php

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

class AddFieldsToContractSubItemsHistories extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('contract_sub_items_histories', function (Blueprint $table) {
            $table->string('project_title')->nullable();
            $table->string('project_type_id')->nullable();
            $table->string('project_type_fa')->nullable();
            $table->string('operation_type_id')->nullable();
            $table->string('operation_type_fa')->nullable();
            $table->string('city_id')->nullable();
            $table->string('city_fa')->nullable();
            $table->string('province_id')->nullable();
            $table->string('province_fa')->nullable();
            $table->string('axis_type_id')->nullable();
            $table->string('axis_type_fa')->nullable();
            $table->string('axis_name_id')->nullable();
            $table->string('axis_name_fa')->nullable();
            $table->string('lat')->nullable();
            $table->string('lng')->nullable();
            $table->string('followup_priority_project')->nullable();
            $table->string('priority_project')->nullable();
            $table->string('operator_name')->nullable();
            $table->string('image_path')->nullable();
            $table->string('unique_code');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('contract_sub_items_histories', function (Blueprint $table) {
            $table->dropColumn('project_title');
            $table->dropColumn('project_type_id');
            $table->dropColumn('project_type_fa');
            $table->dropColumn('operation_type_id');
            $table->dropColumn('operation_type_fa');
            $table->dropColumn('city_id');
            $table->dropColumn('city_fa');
            $table->dropColumn('province_id');
            $table->dropColumn('province_fa');
            $table->dropColumn('axis_type_id');
            $table->dropColumn('axis_type_fa');
            $table->dropColumn('axis_name_id');
            $table->dropColumn('axis_name_fa');
            $table->dropColumn('lat');
            $table->dropColumn('lng');
            $table->dropColumn('followup_priority_project');
            $table->dropColumn('priority_project');
            $table->dropColumn('operator_name');
            $table->dropColumn('image_path');
            $table->dropColumn('unique_code');
        });
    }
}