<?php

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

class CreateEntriesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('entries', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('parent_id')->unsigned()->nullable()->index('FK_entries_2');
			$table->integer('backend_user_id')->unsigned()->nullable()->index('FK_entries_1');
			$table->string('picture', 150)->nullable();
			$table->dateTime('entry_date')->nullable();
			$table->integer('image_id')->unsigned()->nullable()->index('FK_entries_3');
			$table->timestamps();
		});
	}


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

}
