<?php

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

class CreateDashboardTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('dashboard', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('user_id')->unsigned();
			$table->smallInteger('column')->unsigned()->default(1);
			$table->smallInteger('order')->unsigned()->default(1);
			$table->string('title', 128)->nullable();
			$table->enum('widget', array('repairs', 'support', 'onsite', 'orders'))->default('repairs');
			$table->text('preferences')->nullable();
			$table->boolean('active')->default(TRUE);
			$table->timestamps();
		});
	}

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

}
