PHP Class luya\console\commands\MigrateController

See also: https://github.com/yiisoft/yii2/issues/384
Author: nadar
Inheritance: extends yii\console\controllers\MigrateController
Show file Open project: luyadev/luya

Public Properties

Property Type Description
$migrationFileDirs Directory where the migrations should be looked up
$moduleMigrationDirectories Module migration directories

Public Methods

Method Description
actionCreate ( string $name, string | boolean $module = false ) Create new migration, first param the name, second param the module where the migration should be put in.
beforeAction ( $action ) initModuleMigrationDirectories beforing runing the action.

Protected Methods

Method Description
createMigration ( $class ) Create a migration based on its class name.
getNewMigrations ( ) : array Returns the migrations that are not applied.

Private Methods

Method Description
getModuleMigrationDirectorie ( $module )
initModuleMigrationDirectories ( )

Method Details

actionCreate() public method

Create new migration, first param the name, second param the module where the migration should be put in.
See also: yii\console\controllers\BaseMigrateController::actionCreate()
public actionCreate ( string $name, string | boolean $module = false )
$name string The name of the migration
$module string | boolean The module name where the migration should be placed in.

beforeAction() public method

initModuleMigrationDirectories beforing runing the action.
See also: yii\console\controllers\MigrateController::beforeAction()
public beforeAction ( $action )

createMigration() protected method

Create a migration based on its class name.
See also: yii\console\controllers\MigrateController::createMigration()
protected createMigration ( $class )

getNewMigrations() protected method

Returns the migrations that are not applied.
protected getNewMigrations ( ) : array
return array list of new migrations

Property Details

$migrationFileDirs public property

Directory where the migrations should be looked up
public $migrationFileDirs

$moduleMigrationDirectories public property

Module migration directories
public $moduleMigrationDirectories