PHPackages                             dmstr/yii2-migrate-command - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. dmstr/yii2-migrate-command

ActiveYii2-extension[Database &amp; ORM](/categories/database)

dmstr/yii2-migrate-command
==========================

Console Migration Command with multiple paths/aliases support

0.3.2(9y ago)31295.5k↓34.5%15[1 issues](https://github.com/dmstr/yii2-migrate-command/issues)6BSD-3-ClausePHP

Since Nov 19Pushed 8y ago7 watchersCompare

[ Source](https://github.com/dmstr/yii2-migrate-command)[ Packagist](https://packagist.org/packages/dmstr/yii2-migrate-command)[ RSS](/packages/dmstr-yii2-migrate-command/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (9)Used By (6)

Extended Migration Command
==========================

[](#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](https://github.com/dmstr/yii2-migrate-command/issues/23#issuecomment-326950039).

---

[![Latest Stable Version](https://camo.githubusercontent.com/ae348900a62c98e83d239aea3d559c11d9e6afad4c14d681b65a30eda4c0422b/68747470733a2f2f706f7365722e707567782e6f72672f646d7374722f796969322d6d6967726174652d636f6d6d616e642f762f737461626c652e737667)](https://packagist.org/packages/dmstr/yii2-migrate-command)[![Total Downloads](https://camo.githubusercontent.com/5366bd347b79daf90b41b79f72d868391f14b13f600bd72911a76ea1fd1d69eb/68747470733a2f2f706f7365722e707567782e6f72672f646d7374722f796969322d6d6967726174652d636f6d6d616e642f646f776e6c6f6164732e737667)](https://packagist.org/packages/dmstr/yii2-migrate-command)[![License](https://camo.githubusercontent.com/b294c654d615acf66fdd93f735304f69029d7d787a82ea1b4f8c28f4581388dd/68747470733a2f2f706f7365722e707567782e6f72672f646d7374722f796969322d6d6967726174652d636f6d6d616e642f6c6963656e73652e737667)](https://packagist.org/packages/dmstr/yii2-migrate-command)

Console Migration Command with multiple paths/aliases support

This extension was created from this [Pull Request](https://github.com/yiisoft/yii2/pull/3273) 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
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

```
composer require dmstr/yii2-migrate-command

```

Usage
-----

[](#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

[](#adding-migrations-via-application-configuration)

Add additional migration paths via application `params`:

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

```

### Adding migrations via extension `bootstrap()`

[](#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

[](#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](http://diemeisterei.de), Stuttgart

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~147 days

Recently: every ~122 days

Total

7

Last Release

3317d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ab2b6685ec71887908ec8cff261a16cd5bb24c69bb8ab52840e220f175f9d?d=identicon)[schmunk](/maintainers/schmunk)

---

Top Contributors

[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (32 commits)")[![omnilight](https://avatars.githubusercontent.com/u/3306537?v=4)](https://github.com/omnilight "omnilight (3 commits)")[![arswarog](https://avatars.githubusercontent.com/u/8736523?v=4)](https://github.com/arswarog "arswarog (1 commits)")[![fps01](https://avatars.githubusercontent.com/u/2114997?v=4)](https://github.com/fps01 "fps01 (1 commits)")[![sblaut](https://avatars.githubusercontent.com/u/13192008?v=4)](https://github.com/sblaut "sblaut (1 commits)")

---

Tags

consolemigrationyii2extensioncommand

### Embed Badge

![Health badge](/badges/dmstr-yii2-migrate-command/health.svg)

```
[![Health](https://phpackages.com/badges/dmstr-yii2-migrate-command/health.svg)](https://phpackages.com/packages/dmstr-yii2-migrate-command)
```

###  Alternatives

[bizley/migration

Migration generator for Yii 2.

297374.3k11](/packages/bizley-migration)[c006/yii2-migration-utility

Automatically writes the create tables for migrations or create tables in general

63160.6k1](/packages/c006-yii2-migration-utility)[hzhihua/yii2-dump

Generate the schema from an existing database

1828.5k1](/packages/hzhihua-yii2-dump)[yii2tech/illuminate

Yii2 to Laravel Migration Package

11315.1k](/packages/yii2tech-illuminate)[e282486518/yii2-console-migration

yii2命令行中使用migration备份和还原数据库

388.1k4](/packages/e282486518-yii2-console-migration)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
