<?php

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

class Add5c87dc33987dfRelationshipsToDiscrictTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('discricts', function(Blueprint $table) {
            if (!Schema::hasColumn('discricts', 'city_id')) {
                $table->integer('city_id')->unsigned()->nullable();
                $table->foreign('city_id', '276666_5c87dc304f0fa')->references('id')->on('cities')->onDelete('set null');
                }
                
        });
    }

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