<?php

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

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

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