<?php

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

class CreateProjectStocksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('project_stocks', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('from_branch_id')->nullable();
            $table->double('stock_in_qty')->nullable();
            $table->double('stock_out_qty')->nullable();
            $table->unsignedInteger('to_branch_id')->nullable();
            $table->unsignedInteger('item_id')->nullable();
            $table->string('remarks',500)->nullable();
            $table->enum('is_recycle', ['0','1','2'])->default('0');
            $table->timestamps();
        });
    }

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