<?php

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

class CreateQuotOcTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('quot_oc', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('quotation_id')->nullable()->unsigned();
            $table->foreign('quotation_id')->references('id')->on('quotation');
            $table->string('reference_no')->nullable();
            $table->date('expected_delivery_date')->nullable();
            $table->string('title')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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