<?php

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

class CreateProposal extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('proposals', function (Blueprint $table) {
            $table->increments('id');
            $table->uuid('uuid');
            $table->integer('professional_id')->unsigned();
            $table->integer('fee');
            $table->uuid('booking_uuid');
            $table->timestamps();
        });
        Schema::table('proposals', function ($table) {
            $table->foreign('professional_id')->references('id')->on('professionals');

        });
    }

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