<?php

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

class RemoveColumn260919 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('developers', function (Blueprint $table) {
            if (Schema::hasColumn('developers', 'youtube')) {
                $table->dropColumn('youtube');
            }
        });
        Schema::table('residential_complexes', function (Blueprint $table) {
            if (Schema::hasColumn('residential_complexes', 'latitude')) {
                $table->dropColumn('latitude');
            }

            if (Schema::hasColumn('residential_complexes', 'longitude')) {
                $table->dropColumn('longitude');
            }
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
