<?php

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

class CreateSemestersTable extends Migration
{

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('semesters', function (Blueprint $table) {
			$table->increments('id');
			$table->string('name', 25)->default('');
			$table->char('code', 3);
			$table->timestamp('start')->nullable();
			$table->timestamp('end')->nullable();

			$table->boolean('is_visible')->default(false);
		});
	}


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