<?php

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

class CreateAbImportTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('ab_import', function(Blueprint $table)
		{
			$table->bigInteger('id')->nullable();
			$table->integer('site_id')->nullable();
			$table->bigInteger('date_orig')->nullable();
			$table->string('plugin', 32)->nullable();
			$table->string('action', 32)->nullable();
			$table->string('remote_table', 32)->nullable();
			$table->string('ab_table', 32)->nullable();
			$table->bigInteger('remote_id')->nullable();
			$table->bigInteger('ab_id')->nullable();
			$table->unique(['site_id','id']);
		});
	}


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

}
