PHP Class TI_Migration, TastyIgniter

Inheritance: extends CI_Migration
Afficher le fichier Open project: tastyigniter/tastyigniter

Méthodes publiques

Méthode Description
__construct ( $config = [] )
current ( string $type = '' ) : mixed Sets the schema to the migration version set in config for a given migration type
find_migrations ( string $type = '' ) : array Retrieves list of available migration scripts for a given migration type
get_available_version ( ) : string Retrieves current available migration version
get_latest_version ( string $type = '' ) : string Retrieves latest migration version for a given migration type
get_migration_number ( string $migration ) : string Extracts the migration number from a filename
get_migrations_path ( string $type = '' ) : string Retrieves the migrations path for a given migration type
get_version ( string $type = '' ) : string Retrieves current schema version for a given migration type
install ( ) : mixed Install TastyIgniter core schema to the migration version set in config.
latest ( string $type = '' ) : mixed Sets the schema to the latest migration for a given migration type
version ( string $target_version, string $type = '' ) : mixed Migrate to a schema version for a given migration type

Méthodes protégées

Méthode Description
_get_version ( string $type = '' ) : string Retrieves current schema version for a given migration type
_update_version ( string $migration, string $type = '' ) Stores the current schema version for a given migration type

Method Details

__construct() public méthode

public __construct ( $config = [] )

_get_version() protected méthode

Retrieves current schema version for a given migration type
protected _get_version ( string $type = '' ) : string
$type string
Résultat string Current migration version

_update_version() protected méthode

Stores the current schema version for a given migration type
protected _update_version ( string $migration, string $type = '' )
$migration string Migration reached
$type string

current() public méthode

Sets the schema to the migration version set in config for a given migration type
public current ( string $type = '' ) : mixed
$type string
Résultat mixed TRUE if already current, FALSE if failed, string if upgraded

find_migrations() public méthode

Retrieves list of available migration scripts for a given migration type
public find_migrations ( string $type = '' ) : array
$type string
Résultat array list of migration file paths sorted by version

get_available_version() public méthode

Retrieves current available migration version
public get_available_version ( ) : string
Résultat string Current migration version

get_latest_version() public méthode

Retrieves latest migration version for a given migration type
public get_latest_version ( string $type = '' ) : string
$type string
Résultat string Latest migration version

get_migration_number() public méthode

Extracts the migration number from a filename
public get_migration_number ( string $migration ) : string
$migration string
Résultat string Numeric portion of a migration filename

get_migrations_path() public méthode

Retrieves the migrations path for a given migration type
public get_migrations_path ( string $type = '' ) : string
$type string
Résultat string migration path

get_version() public méthode

Retrieves current schema version for a given migration type
public get_version ( string $type = '' ) : string
$type string
Résultat string Current migration version

install() public méthode

Install TastyIgniter core schema to the migration version set in config.
public install ( ) : mixed
Résultat mixed TRUE installed, FALSE if failed

latest() public méthode

Sets the schema to the latest migration for a given migration type
public latest ( string $type = '' ) : mixed
$type string
Résultat mixed TRUE if already latest, FALSE if failed, string if upgraded

version() public méthode

Calls each migration step required to get to the schema version of choice
public version ( string $target_version, string $type = '' ) : mixed
$target_version string Target schema version
$type string
Résultat mixed TRUE if already latest, FALSE if failed, string if upgraded