<?php

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

class AlterStockPurchaseOrdersTableChangeTotalVatByVat extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('stock_purchase_orders', function($table){
			$table->renameColumn('total_vat', 'vat');
			$table->dropColumn('items_cost');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('stock_purchase_orders', function($table){
			$table->renameColumn('vat', 'total_vat');
			$table->double('items_cost');
		});
	}

}
