<?php

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

class CreateBBJaheshesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('b_b_jaheshes', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('province_fa')->nullable();
            $table->unsignedTinyInteger('province_id')->nullable();
            $table->foreign('province_id')
                ->references('id')
                ->on('provinces');
            $table->tinyInteger('project_type')->nullable(); 
            $table->unsignedTinyInteger('plan_id')->nullable();   
            $table->double('plan_fa')->nullable();  
            $table->double('project_count_all')->nullable();
            $table->double('project_count_done')->nullable();
            $table->string('project_progress')->nullable();
            $table->timestamps();
        });
    }

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