<?php

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

class AlterStockTableAddNotesSeverityAprovalColumns extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('stock', function($table){
			$table->integer('severity_id')->default("2")->unsigned()->index();
			$table->text('notes')->nullable();
			$table->boolean('approval_required')->defualt(null);
		});
	}

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

}
