<?php

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

class CreateSigesituacoesJuridicasTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('sige.situacoes_juridicas', function(Blueprint $table)
		{
			$table->bigInteger('id')->primary('situacoes_juridicas_pkey');
			$table->boolean('ativo');
			$table->dateTime('dhc');
			$table->dateTime('dhm');
			$table->string('nome', 50)->unique('situacoes_juridicas_nome_key');
			$table->string('livro')->nullable();
			$table->string('matricula')->nullable();
			$table->string('nome_cartorio')->nullable();
			$table->string('oficio')->nullable();
			$table->string('registro')->nullable();
			$table->string('nome_situacao')->nullable();
		});
	}


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

}
