<?php

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

class CreateIbgemunicipiosTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('ibge.municipios', function(Blueprint $table)
		{
			$table->bigInteger('id')->primary('municipios_pkey');
			$table->string('nome', 32)->nullable();
			$table->string('uf', 2)->nullable();
			$table->string('mesoregiao', 34)->nullable();
			$table->string('microregiao', 36)->nullable();
			$table->float('latitude', 10, 0)->nullable();
			$table->float('longitude', 10, 0)->nullable();
			$table->bigInteger('area_modulo_fiscal')->nullable();
			$table->string('regiao', 12)->nullable();
			$table->boolean('is_participa_car')->nullable();
			$table->string('mesoregia')->nullable();
		});
	}


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

}
