yii2-migrate-command

Console Migration Command for Yii 2.0 with multiple paths/aliases support

Github星跟踪图

Extended Migration Command

DEPRECATION NOTICE - since Yii 2.0.12 this extension is obsolete, its functionality is now supported by the framework core. For details see also issue.


Latest Stable Version
Total Downloads
License

Console Migration Command with multiple paths/aliases support

This extension was created from this Pull Request on GitHub, which became unmergeable.
Until this feature will be reimplemented into the core, you can use this extension if you need to handle multiple migration paths.

Note! If using dmstr/yii2-migrate-command in an existing project, you may have to remove your migration table, due to a schema change.

Installation

The preferred way to install this extension is through composer.

composer require dmstr/yii2-migrate-command

Usage

Configure the command in your main application configuration:

'controllerMap'       => [
    'migrate' => [
        'class' => 'dmstr\console\controllers\MigrateController'
    ],
],

Once the extension is installed and configured, simply use it on your command line

./yii migrate

Adding migrations via application configuration

Add additional migration paths via application params:

"yii.migrations"=> [
    "@dektrium/user/migrations",
],

Adding migrations via extension bootstrap()

You can also add migrations in your module bootstrap process:

public function bootstrap($app)
{
    $app->params['yii.migrations'][] = '@vendorname/packagename/migrations';
}

Adding migrations via command parameter

If you want to specify an additional path directly with the command, use

./yii migrate --migrationLookup=@somewhere/migrations/data1,@somewhere/migrations/data2

Note! Please make sure to not use spaces in the comma separated list.


Built by dmstr, Stuttgart

主要指标

概览
名称与所有者dmstr/yii2-migrate-command
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证Other
所有者活动
创建于2014-07-03 08:16:35
推送于2017-09-06 20:06:12
最后一次提交2017-09-06 20:06:11
发布数7
最新版本名称0.4.0-beta2 (发布于 2017-04-18 20:00:27)
第一版名称0.1.0 (发布于 )
用户参与
星数31
关注者数7
派生数15
提交数43
已启用问题?
问题数14
打开的问题数1
拉请求数7
打开的拉请求数0
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?