<?php

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

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

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