<?php

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

class TypSemesterObjectives extends Migration
{

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


			$table->foreign('typ_semester_outcome_id')
				->references('id')
				->on('typ_semester_outcome')
				->onDelete('cascade')
				->onUpdate('cascade');
			$table->foreign('objective_id')
				->references('id')
				->on('objectives')
				->onDelete('cascade')
				->onUpdate('cascade');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{

		Schema::drop('typ_semester_objectives');
	}
}
