PHP Класс 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
Наследование: extends CConsoleCommand
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
actionCreate ( $args )
actionDown ( $args )
actionHistory ( $args )
actionMark ( $args )
actionNew ( $args )
actionRedo ( $args )
actionTo ( $args )
actionUp ( $args )
beforeAction ( $action, $params )
confirm ( $message, $default = false )
getHelp ( )

Защищенные методы

Метод Описание
createMigrationHistoryTable ( )
getDbConnection ( )
getMigrationHistory ( $limit )
getNewMigrations ( )
getTemplate ( )
instantiateMigration ( $class )
migrateDown ( $class )
migrateUp ( $class )

Описание методов

actionCreate() публичный Метод

public actionCreate ( $args )

actionDown() публичный Метод

public actionDown ( $args )

actionHistory() публичный Метод

public actionHistory ( $args )

actionMark() публичный Метод

public actionMark ( $args )

actionNew() публичный Метод

public actionNew ( $args )

actionRedo() публичный Метод

public actionRedo ( $args )

actionTo() публичный Метод

public actionTo ( $args )

actionUp() публичный Метод

public actionUp ( $args )

beforeAction() публичный Метод

public beforeAction ( $action, $params )

confirm() публичный Метод

public confirm ( $message, $default = false )

createMigrationHistoryTable() защищенный Метод

getDbConnection() защищенный Метод

protected getDbConnection ( )

getHelp() публичный Метод

public getHelp ( )

getMigrationHistory() защищенный Метод

protected getMigrationHistory ( $limit )

getNewMigrations() защищенный Метод

protected getNewMigrations ( )

getTemplate() защищенный Метод

protected getTemplate ( )

instantiateMigration() защищенный Метод

protected instantiateMigration ( $class )

migrateDown() защищенный Метод

protected migrateDown ( $class )

migrateUp() защищенный Метод

protected migrateUp ( $class )

Описание свойств

$connectionID публичное свойство

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

$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
public $dataPatchPath

$defaultAction публичное свойство

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

$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.
public $interactive

$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 $templateFile