<?php

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

class CreateFgProcessTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('fg_process', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('bom_id')->nullable()->unsigned();
            $table->foreign('bom_id')->references('id')->on('bill_of_materials');
            $table->string('reference_no')->nullable();
            $table->integer('fg_qty')->nullable();
            $table->timestamps();
        });
    }

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