<?php

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

class Add5cece2a8caf56RelationshipsToResidentialComplexSeoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('residential_complex_seos', function(Blueprint $table) {
            if (!Schema::hasColumn('residential_complex_seos', 'residential_complex_id')) {
                $table->integer('residential_complex_id')->unsigned()->nullable();
                $table->foreign('residential_complex_id', '309010_5cece2a498e47')->references('id')->on('residential_complexes')->onDelete('cascade');
                }
                
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('residential_complex_seos', function(Blueprint $table) {
            
        });
    }
}
