<?php

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

class CreateContractSubItemsHistoriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('contract_sub_items_histories', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('progress_project')->nullable();
            $table->string('last_status_id')->nullable();
            $table->string('last_status_fa')->nullable();
            $table->string('image1')->nullable();
            $table->string('image2')->nullable();
            $table->string('operation_type_progress1')->nullable();
            $table->string('operation_type_progress2')->nullable();
            $table->string('operation_type_progress3')->nullable();
            $table->string('operation_type_progress4')->nullable();
            $table->string('last_digit_project')->nullable();
            $table->string('last_function_operator')->nullable();
            $table->string('last_payable_operator')->nullable();
            $table->string('complete_payable')->nullable();
            $table->string('created_at_fa')->nullable();
            $table->String('updated_at_fa')->nullable();
            $table->unsignedBigInteger('subitem_id');
            $table->foreign('subitem_id')->references('id')->on('contract_subitems');
            $table->timestamps();
        });
    }

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