<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Migration_Version extends CI_Migration
{
    function __construct() {
        
        parent::__construct();
    }
    
    public function up()
    {
        $this->db->query("CREATE TABLE `cep_bairro_geo` ( `id_geo_bairro` INT NOT NULL AUTO_INCREMENT , `id_bairro` INT NOT NULL , `b_lat` VARCHAR(255) NOT NULL , `b_long` VARCHAR(255) NOT NULL , PRIMARY KEY (`id_geo_bairro`)) ENGINE = InnoDB;");
        $this->db->query("ALTER TABLE `cad_imovel` ADD `tipo_empreendimento` VARCHAR(255) NOT NULL AFTER `status_lancamento`;");
    }

    public function down()
    {
        $this->db->query("DROP TABLE `cep_bairro_geo`");
        $this->db->query("ALTER TABLE `cad_imovel` DROP `tipo_empreendimento`;");
    }
}