<?php

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

class CreateAbExportTable extends Migration {

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


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

}
