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
Afficher le fichier Open project: openeyes/openeyes

Méthodes publiques

Свойство 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.

Méthodes publiques

Méthode 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 ( )

Méthodes protégées

Méthode Description
createMigrationHistoryTable ( )
getDbConnection ( )
getMigrationHistory ( $limit )
getNewMigrations ( )
getTemplate ( )
instantiateMigration ( $class )
migrateDown ( $class )
migrateUp ( $class )

Method Details

actionCreate() public méthode

public actionCreate ( $args )

actionDown() public méthode

public actionDown ( $args )

actionHistory() public méthode

public actionHistory ( $args )

actionMark() public méthode

public actionMark ( $args )

actionNew() public méthode

public actionNew ( $args )

actionRedo() public méthode

public actionRedo ( $args )

actionTo() public méthode

public actionTo ( $args )

actionUp() public méthode

public actionUp ( $args )

beforeAction() public méthode

public beforeAction ( $action, $params )

confirm() public méthode

public confirm ( $message, $default = false )

createMigrationHistoryTable() protected méthode

getDbConnection() protected méthode

protected getDbConnection ( )

getHelp() public méthode

public getHelp ( )

getMigrationHistory() protected méthode

protected getMigrationHistory ( $limit )

getNewMigrations() protected méthode

protected getNewMigrations ( )

getTemplate() protected méthode

protected getTemplate ( )

instantiateMigration() protected méthode

protected instantiateMigration ( $class )

migrateDown() protected méthode

protected migrateDown ( $class )

migrateUp() protected méthode

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