My Project
 All Data Structures Namespaces Functions Variables
Public Member Functions | Protected Member Functions | Protected Attributes
CI_Migration Class Reference

Public Member Functions

 __construct ($config=array())
 
 version ($target_version)
 
 latest ()
 
 current ()
 
 error_string ()
 
 __get ($var)
 

Protected Member Functions

 find_migrations ()
 
 _get_version ()
 
 _update_version ($migrations)
 

Protected Attributes

 $_migration_enabled = FALSE
 
 $_migration_path = NULL
 
 $_migration_version = 0
 
 $_error_string = ''
 

Member Function Documentation

__get (   $var)

Enable the use of CI super-global

Parameters
mixed$var
Returns
mixed
_get_version ( )
protected

Retrieves current schema version

Returns
int Current Migration
_update_version (   $migrations)
protected

Stores the current schema version

Parameters
intMigration reached
Returns
bool
current ( )

Set's the schema to the migration version set in config

Returns
mixed true if already current, false if failed, int if upgraded
error_string ( )

Error string

Returns
string Error message returned as a string
find_migrations ( )
protected

Set's the schema to the latest migration

Returns
mixed true if already latest, false if failed, int if upgraded
latest ( )

Set's the schema to the latest migration

Returns
mixed true if already latest, false if failed, int if upgraded
version (   $target_version)

Migrate to a schema version

Calls each migration step required to get to the schema version of choice

Parameters
intTarget schema version
Returns
mixed TRUE if already latest, FALSE if failed, int if upgraded

The documentation for this class was generated from the following file: