<?php

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

class Create5cbddb716cb08OtherOptionResidentialComplexTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(! Schema::hasTable('other_option_residential_complex')) {
            Schema::create('other_option_residential_complex', function (Blueprint $table) {
                $table->integer('other_option_id')->unsigned()->nullable();
                $table->foreign('other_option_id', 'fk_p_294144_295424_reside_5cbddb716cc52')->references('id')->on('other_options')->onDelete('cascade');
                $table->integer('residential_complex_id')->unsigned()->nullable();
                $table->foreign('residential_complex_id', 'fk_p_295424_294144_othero_5cbddb716cd4a')->references('id')->on('residential_complexes')->onDelete('cascade');
                
            });
        }
    }

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