<?php

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

class CreateRubricOutcome extends Migration
{

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('rubric_outcome', function (Blueprint $table) {
			$table->increments('id');

			$table->integer('rubric_id')->unsigned();
			$table->foreign('rubric_id')
				->references('id')
				->on('rubrics')
				->onDelete('cascade')
				->onUpdate('cascade');

			$table->integer('outcome_id')->unsigned();
			$table->foreign('outcome_id')
				->references('id')
				->on('outcomes')
				->onDelete('cascade')
				->onUpdate('cascade');
		});
	}

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