<?php

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

class CreateFgProducedTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('fg_produced', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('production_id')->nullable()->unsigned();
            $table->foreign('production_id')->references('id')->on('production_order');
            $table->integer('qty_added')->nullable();
            $table->integer('new_qty')->nullable();
            $table->string('comment')->nullable();
            $table->timestamps();
        });
    }

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