<?php

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

class CreateTransformativeFutureCourse extends Migration
{

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('transformative_future_course', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('trans_id')->unsigned();
			$table->char('course_code', 8);
			$table->char('course_number', 4)->default('0000');
			$table->integer('semester_id')->unsigned();
			$table->foreign('trans_id')
				->references('id')
				->on('transformative_actions')
				->onDelete('cascade')
				->onUpdate('cascade');
		});
	}

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