<?php

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

class AlterStockTransactionsTableAddRelatedTypeStockReport extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('stock_transactions', function(Blueprint $table)
		{
			DB::statement("ALTER TABLE `stock_transactions` CHANGE `related_type` `related_type` ENUM( 'task', 'sale', 'purchase_order', 'project', 'invoice', 'custom', 'user', 'stock_report' ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL");
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('stock_transactions', function(Blueprint $table)
		{
			DB::statement("ALTER TABLE `stock_transactions` CHANGE `related_type` `related_type` ENUM( 'task', 'sale', 'purchase_order', 'project', 'invoice', 'custom', 'user' ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL");
		});
	}

}
