<?php

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

class CreateEnquiryFollowUpsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('enquiry_follow_ups', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('enquiry_id')->nullable()->unsigned();
            $table->foreign('enquiry_id')->references('id')->on('enquiries');
            $table->text('description')->nullable();
            $table->bigInteger('taken_by_user_id')->nullable()->unsigned();
            $table->foreign('taken_by_user_id')->references('id')->on('users');
            $table->string('title')->nullable();
            $table->timestamps();
        });
    }

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