<?php

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

class CreateAbProductCatTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('ab_product_cat', function(Blueprint $table)
		{
			$table->integer('id')->default(0);
			$table->integer('site_id')->default(0)->index();
			$table->integer('parent_id')->nullable()->index();
			$table->binary('group_avail', 65535)->nullable();
			$table->binary('notes', 65535)->nullable();
			$table->boolean('active')->nullable();
			$table->string('template', 128)->nullable();
			$table->integer('position')->nullable();
			$table->integer('recur_schedule')->default(0);
			$table->primary(['id','site_id']);
		});
	}


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

}
