<?php

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

class SupplierbookingCustomerbookingTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('supplierbooking_customerbooking', function (Blueprint $table) {
            $table->integer('supplierbooking_id')->unsigned();
            $table->integer('booking_id')->unsigned();

            $table->foreign('supplierbooking_id')->references('id')->on('supplier_bookings');
            $table->foreign('booking_id')->references('id')->on('bookings');
        });
    }

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