<?php

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

class Add5d67dc60c49a1RelationshipsToStreetNameTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('street_names', function(Blueprint $table) {
            if (!Schema::hasColumn('street_names', 'type_id')) {
                $table->integer('type_id')->unsigned()->nullable();
                $table->foreign('type_id', '289513_5d67dc5abc112')->references('id')->on('street_name_types')->onDelete('set null');
                }
                
        });
    }

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