<?php

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

class AddAccommodationTypeToPropertyRoomRate extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('property_room_rate', function (Blueprint $table) {
            $table->unsignedInteger('accommodation_type')->after('description');
        });
        \DB::table('property_room_rate')->update(['accommodation_type' => 13]);
        Schema::table('property_room_rate', function (Blueprint $table) {
            $table->foreign('accommodation_type', 'accommodation_type_foreign')->references('id')->on('property_fact');
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

    }
}
