<?php

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

class CreateSigesetoresTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('sige.setores', function(Blueprint $table)
		{
			$table->bigInteger('id', true);
			$table->boolean('ativo');
			$table->dateTime('dhc')->default('now()');
			$table->dateTime('dhm')->default('now()');
			$table->string('nome', 20)->unique('setores_nome_key');
		});
	}


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

}
