Migrate::_update_schema_version PHP Method

_update_schema_version() private method

Stores the current schema version
private _update_schema_version ( $schema_version ) : void
$schema_version integer Schema version reached
return void Outputs a report of the migration
    private function _update_schema_version($schema_version)
    {
        // check if settings table exists.
        if ($this->_ci->db->table_exists('settings')) {
            $table = $this->_ci->db->dbprefix('settings');
            $query = $this->_ci->db->simple_query('SELECT option_name FROM ' . $table . ' WHERE option_name="script_db_version"');
            if ($query) {
                $data = array('option_value' => $schema_version);
                $this->_ci->db->where('option_name', 'script_db_version');
                $this->_ci->db->update('settings', $data);
            }
        }
        return 1;
    }