<?php

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

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

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('forum_channels', function (Blueprint $table) {
            if (Schema::hasColumn('forum_channels', 'slug')) {
                $table->dropColumn('slug');
            };
        });
    }
}
