<?php

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

class AlterStockGroupsTableChangeKashflowCategoryIdType extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('stock_groups', function(Blueprint $table)
		{
			$table->dropColumn('kashflow_category_id');
		});

		Schema::table('stock_groups', function(Blueprint $table)
		{
			$table->string('kashflow_category_id', 16)->nullable();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('stock_groups', function(Blueprint $table)
		{
			$table->dropColumn('kashflow_category_id');
		});

		Schema::table('stock_groups', function(Blueprint $table)
		{
			$table->integer('kashflow_category_id')->nullable();
		});
	}

}
