CI_Migration::_get_version PHP Method

_get_version() protected method

Retrieves current schema version
protected _get_version ( ) : string
return string Current migration version
    protected function _get_version()
    {
        $row = $this->db->select('version')->get($this->_migration_table)->row();
        return $row ? $row->version : '0';
    }

Usage Example

Beispiel #1
0
 /**
  * Retrieves current schema version
  *
  * @return	int	Current Migration
  */
 function get_version()
 {
     return parent::_get_version();
 }