<?php

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

class CreateModuleGroupsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('module_groups', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',100)->unique();
            $table->string('module_key',150)->unique()->nullable();
            $table->string('module_url',150)->unique()->nullable();
            $table->string('module_icon',50)->nullable();
            $table->integer('module_rank');
            $table->boolean('view_sidebar')->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('module_groups');
    }
}
