<?php

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

class CreateMenuItemsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('menu_items', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('parent_id')->unsigned()->nullable()->index('FK_menu_items_2');
			$table->integer('menu_id')->unsigned()->index('FK_menu_items_1');
			$table->integer('entry_id')->unsigned()->nullable()->index('FK_menu_items_4');
			$table->string('url_old');
			$table->string('target', 20)->nullable();
			$table->integer('position')->unsigned()->nullable();
			$table->boolean('active')->default(1);
			$table->timestamps();
		});
	}


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

}
