<?php

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

class Create5cbddb7155174ResidentialComplexRoomCountTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(! Schema::hasTable('residential_complex_room_count')) {
            Schema::create('residential_complex_room_count', function (Blueprint $table) {
                $table->integer('residential_complex_id')->unsigned()->nullable();
                $table->foreign('residential_complex_id', 'fk_p_295424_294142_roomco_5cbddb7155348')->references('id')->on('residential_complexes')->onDelete('cascade');
                $table->integer('room_count_id')->unsigned()->nullable();
                $table->foreign('room_count_id', 'fk_p_294142_295424_reside_5cbddb71553ed')->references('id')->on('room_counts')->onDelete('cascade');
            });
        }
    }

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