<?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_cadastro` 
            ADD `img_pj` VARCHAR(255) NOT NULL AFTER `aviso_curtir`, 
            ADD `img_pj_uri` VARCHAR(255) NOT NULL AFTER `img_pj`, 
            ADD `cnpj` VARCHAR(255) NOT NULL AFTER `img_pj_uri`, 
            ADD `nome_fantasia` VARCHAR(255) NOT NULL AFTER `cnpj`, 
            ADD `descricao_pj` TEXT NOT NULL AFTER `nome_fantasia`;"
        );
    }

    public function down()
    {
        $this->db->query(
          "ALTER TABLE `cad_cadastro`
          DROP `img_pj`,
          DROP `img_pj_uri`,
          DROP `cnpj`,
          DROP `nome_fantasia`,
          DROP `descricao_pj`;"
        );
    }
}