<?php

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

class CreateRmaItemsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('rma_items', function(Blueprint $table)
		{
			$table->increments('id');
			$table->unsignedBigInteger('task_id')->index();
			$table->unsignedBigInteger('stock_id');
			$table->smallInteger('quantity')->default(1);
			$table->unsignedBigInteger('status_id')->nullable();
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('rma_items');
	}

}
