<?php

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

class CreateAbEmailTemplateTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('ab_email_template', function(Blueprint $table)
		{
			$table->bigInteger('id')->default(0);
			$table->integer('site_id')->default(0);
			$table->boolean('active')->nullable();
			$table->integer('email_setup_id')->default(0);
			$table->string('name', 128)->nullable();
			$table->string('description', 32)->nullable();
			$table->text('notes')->nullable();
			$table->primary(['id','site_id','email_setup_id']);
			$table->index(['email_setup_id','site_id']);
		});
	}


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

}
