<?php

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

class CreateAbGroupMethodTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('ab_group_method', function(Blueprint $table)
		{
			$table->integer('id')->default(0);
			$table->integer('site_id')->default(0);
			$table->integer('method_id')->default(0);
			$table->integer('group_id')->default(0);
			$table->primary(['id','site_id','method_id','group_id']);
			$table->unique(['id','site_id']);
			$table->index(['method_id','site_id']);
			$table->index(['group_id','site_id']);
		});
	}


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

}
