<?php

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

class CreateBOQItemsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('b_o_q_items', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('bill_of_quantity_id')->nullable();
            $table->unsignedInteger('inventory_unit_id')->nullable();
            $table->unsignedInteger('item_id')->nullable();
            $table->double('quantity')->nullable();
            $table->string('item_description')->nullable();
            $table->enum('is_recycle', ['0','1','2'])->default('0');
            $table->timestamps();
        });
    }

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