<?php

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

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

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

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

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