db->table_exists('cat')) { if ($this->db->field_exists('frequency', 'cat')) { $fields = array( 'frequency' => array( 'name' => 'frequency', 'type' => 'BIGINT', 'null' => TRUE, 'default' => NULL, ), ); $this->dbforge->modify_column('cat', $fields); } } } public function down() { if ($this->db->table_exists('cat')) { if ($this->db->field_exists('frequency', 'cat')) { $fields = array( 'frequency' => array( 'name' => 'frequency', 'type' => 'VARCHAR(10)', 'null' => TRUE, 'default' => NULL, ), ); $this->dbforge->modify_column('cat', $fields); } } } }