<?php

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

class CreateMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('menus', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('padre_id')->default(0);
            $table->string('nombre');
            $table->string('menu');
            $table->string('alias');
            $table->string('tipo');
            $table->string('destino');
            $table->string('icono')->nullable();
            $table->string('color')->nullable();
            $table->text('configuraciones')->nullable();
            $table->integer('orden')->nullable();
            $table->string('permiso')->nullable();
            $table->timestamps();
        });
    }

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