<?php

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

class CreateAbAccountMemoTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('ab_account_memo', function(Blueprint $table)
		{
			$table->bigInteger('id')->nullable();
			$table->integer('site_id')->nullable();
			$table->bigInteger('date_orig')->nullable();
			$table->bigInteger('staff_id')->nullable();
			$table->bigInteger('account_id')->nullable()->index('account');
			$table->string('type', 32)->nullable();
			$table->string('memo')->nullable()->index('memo');
			$table->string('misc', 32)->nullable();
			$table->unique(['site_id','id']);
		});
	}


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

}
