PHP 클래스 TI_Migration, TastyIgniter

상속: extends CI_Migration
파일 보기 프로젝트 열기: tastyigniter/tastyigniter

공개 메소드들

메소드 설명
__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

보호된 메소드들

메소드 설명
_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

메소드 상세

__construct() 공개 메소드

public __construct ( $config = [] )

_get_version() 보호된 메소드

Retrieves current schema version for a given migration type
protected _get_version ( string $type = '' ) : string
$type string
리턴 string Current migration version

_update_version() 보호된 메소드

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

current() 공개 메소드

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

find_migrations() 공개 메소드

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

get_available_version() 공개 메소드

Retrieves current available migration version
public get_available_version ( ) : string
리턴 string Current migration version

get_latest_version() 공개 메소드

Retrieves latest migration version for a given migration type
public get_latest_version ( string $type = '' ) : string
$type string
리턴 string Latest migration version

get_migration_number() 공개 메소드

Extracts the migration number from a filename
public get_migration_number ( string $migration ) : string
$migration string
리턴 string Numeric portion of a migration filename

get_migrations_path() 공개 메소드

Retrieves the migrations path for a given migration type
public get_migrations_path ( string $type = '' ) : string
$type string
리턴 string migration path

get_version() 공개 메소드

Retrieves current schema version for a given migration type
public get_version ( string $type = '' ) : string
$type string
리턴 string Current migration version

install() 공개 메소드

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

latest() 공개 메소드

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

version() 공개 메소드

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
리턴 mixed TRUE if already latest, FALSE if failed, string if upgraded