<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddModuleIdToTierPermissionsTable extends Migration
{

    public function up()
    {
        Schema::table('tier_permissions', function (Blueprint $table) {
            $table->integer('module_id')->after('tier_id')->nullable();
            $table->integer('sub_module_id')->nullable()->change();
        });
    }


    public function down()
    {
        Schema::table('tier_permissions', function (Blueprint $table) {           
            $table->dropColumn('module_id');
        });
    }
}

