<?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("ALTER TABLE  `cad_imovel` ADD  `visualizacoes` INT NOT NULL ;");
        $this->db->query("ALTER TABLE  `ngc_chat` ADD  `opcao_recusado` INT NOT NULL ;");
        $this->db->query("ALTER TABLE  `fnc_simulacao` ADD  `beneficiado` VARCHAR( 255 ) NOT NULL , ADD  `data_beneficio` VARCHAR( 255 ) NOT NULL ;");
        $this->db->query("ALTER TABLE  `cad_img` ADD  `id_img_rel` INT NOT NULL ;");
        
    }

    public function down()
    {
        $this->db->query("ALTER TABLE `cad_imovel` DROP `visualizacoes`;");
        $this->db->query("ALTER TABLE `ngc_chat` DROP `opcao_recusado`;");
        $this->db->query("ALTER TABLE `fnc_simulacao` DROP `beneficiado`, DROP `data_beneficio`;");
        
        
    }
}