PHP Class DataPatchCommand

The following modification have been made - Yii::getPathOfAlias removed so the migration can accept external path - Migration table name holder property $migrationTable became CONST, it cannot be overriden from CLI, cannot run accidentaly on main migration table - Property migrationPath renamed to dataPatchPath to be more verbose and the default value is empty string, each time the user has to specify the --dataPatchPath
Inheritance: extends CConsoleCommand
Datei anzeigen Open project: openeyes/openeyes

Public Properties

Property Type Description
$connectionID the application component ID that specifies the database connection for storing migration information. Defaults to 'db'.
$dataPatchPath the directory that stores the migrations. This must be specified in terms of a full path, and the corresponding directory must exist. opt/openeyes/Openeyes-Institution/env/50_prod/patch
$defaultAction the default command action. It defaults to 'up'.
$interactive whether to execute the migration in an interactive mode. Defaults to true. Set this to false when performing migration in a cron job or background process.
$templateFile the path of the template file for generating new migrations. This must be specified in terms of a full path (e.g. /opt/openeyese/Openeyes-Institution/template). If not set, an internal template will be used.

Public Methods

Method Description
actionCreate ( $args )
actionDown ( $args )
actionHistory ( $args )
actionMark ( $args )
actionNew ( $args )
actionRedo ( $args )
actionTo ( $args )
actionUp ( $args )
beforeAction ( $action, $params )
confirm ( $message, $default = false )
getHelp ( )

Protected Methods

Method Description
createMigrationHistoryTable ( )
getDbConnection ( )
getMigrationHistory ( $limit )
getNewMigrations ( )
getTemplate ( )
instantiateMigration ( $class )
migrateDown ( $class )
migrateUp ( $class )

Method Details

actionCreate() public method

public actionCreate ( $args )

actionDown() public method

public actionDown ( $args )

actionHistory() public method

public actionHistory ( $args )

actionMark() public method

public actionMark ( $args )

actionNew() public method

public actionNew ( $args )

actionRedo() public method

public actionRedo ( $args )

actionTo() public method

public actionTo ( $args )

actionUp() public method

public actionUp ( $args )

beforeAction() public method

public beforeAction ( $action, $params )

confirm() public method

public confirm ( $message, $default = false )

createMigrationHistoryTable() protected method

getDbConnection() protected method

protected getDbConnection ( )

getHelp() public method

public getHelp ( )

getMigrationHistory() protected method

protected getMigrationHistory ( $limit )

getNewMigrations() protected method

protected getNewMigrations ( )

getTemplate() protected method

protected getTemplate ( )

instantiateMigration() protected method

protected instantiateMigration ( $class )

migrateDown() protected method

protected migrateDown ( $class )

migrateUp() protected method

protected migrateUp ( $class )

Property Details

$connectionID public_oe property

the application component ID that specifies the database connection for storing migration information. Defaults to 'db'.
public $connectionID

$dataPatchPath public_oe property

the directory that stores the migrations. This must be specified in terms of a full path, and the corresponding directory must exist. opt/openeyes/Openeyes-Institution/env/50_prod/patch
public $dataPatchPath

$defaultAction public_oe property

the default command action. It defaults to 'up'.
public $defaultAction

$interactive public_oe property

whether to execute the migration in an interactive mode. Defaults to true. Set this to false when performing migration in a cron job or background process.
public $interactive

$templateFile public_oe property

the path of the template file for generating new migrations. This must be specified in terms of a full path (e.g. /opt/openeyese/Openeyes-Institution/template). If not set, an internal template will be used.
public $templateFile