CI_Migration::latest PHP Method

latest() public method

Sets the schema to the latest migration
public latest ( ) : mixed
return mixed Current version string on success, FALSE on failure
    public function latest()
    {
        $migrations = $this->find_migrations();
        if (empty($migrations)) {
            $this->_error_string = $this->lang->line('migration_none_found');
            return FALSE;
        }
        $last_migration = basename(end($migrations));
        // Calculate the last migration step from existing migration
        // filenames and proceed to the standard version migration
        return $this->version($this->_get_migration_number($last_migration));
    }