<?php

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

class CreateSupplierBookingItemsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('supplier_booking_items', function (Blueprint $table) {
            $table->increments('id');
            $table->string('china_bankslip_url');
            $table->integer('booking_id')->unsigned();
            $table->foreign('booking_id')->references('id')->on('bookings');
            $table->double('bank_in_amount');
            $table->integer('supplierbooking_id')->unsigned();
            $table->foreign('supplierbooking_id')->references('id')->on('supplier_bookings');
            $table->timestamps();
        });
    }

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