<?php

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

class CreateSigeprocessosTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('sige.processos', function(Blueprint $table)
		{
			$table->bigInteger('id')->primary('processos_pkey');
			$table->boolean('ativo');
			$table->bigInteger('criado_por_id');
			$table->text('descricao')->nullable();
			$table->dateTime('dhc');
			$table->dateTime('dhm');
			$table->bigInteger('etapa_id');
			$table->bigInteger('lote_id');
			$table->bigInteger('modificado_por_id');
			$table->bigInteger('pendencia_id')->nullable();
			$table->boolean('sem_pendencia');
			$table->text('situacao')->nullable();
			$table->boolean('conferido')->nullable()->default(0);
			$table->dateTime('data_conferencia')->nullable();
			$table->bigInteger('conferido_por_id')->nullable();
		});
	}


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

}
