private function _get_db_schema_version()
{
if ($this->_ci->db->table_exists('settings')) {
$this->_ci->db->select('option_value')->from('settings')->where('option_name', 'script_db_version');
$query = $this->_ci->db->get();
if ($query->num_rows() > 0) {
$row = $query->row();
return $row->option_value;
}
return 1;
} else {
return 0;
}
}