<?php

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

class AddColumnProductionOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('production_order', function (Blueprint $table) {
            //
            $table->bigInteger('production_stage_id')->nullable()->unsigned();
            $table->foreign('production_stage_id')->references('id')->on('production_order_stages');
            $table->bigInteger('product_uom_id')->nullable()->unsigned();
            $table->foreign('product_uom_id')->references('id')->on('product_uom');
            $table->boolean('same_store_in_sub_process')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
