<?php

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

class CreateEntriesLangTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('entries_lang', function(Blueprint $table)
		{
			$table->increments('translation_id');
			$table->integer('entry_id')->unsigned();
			$table->string('language_id', 10);
			$table->string('title', 150)->nullable();
			$table->text('content', 16777215)->nullable();
			$table->unique(['entry_id','language_id'], 'idx_entry_lang');
		});
	}


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

}
