yii2-migrate-command

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

  • 所有者: dmstr/yii2-migrate-command
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
    CLI
  • 喜歡:
    0
      比較:

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)
平台
許可證
所有者活动
創建於2014-07-03 00:16:35
推送於2017-09-06 12:06:12
最后一次提交2017-09-06 14:06:11
發布數7
最新版本名稱0.4.0-beta2 (發布於 2017-04-18 14:00:27)
第一版名稱0.1.0 (發布於 )
用户参与
星數31
關注者數8
派生數15
提交數43
已啟用問題?
問題數14
打開的問題數1
拉請求數7
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?