PHPackages                             fishvision/yii2-migrate - 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. fishvision/yii2-migrate

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

fishvision/yii2-migrate
=======================

Extended migration support

1.0.1(8y ago)9103.1k↓30.6%5[3 issues](https://github.com/fishvision/yii2-migrate/issues)[1 PRs](https://github.com/fishvision/yii2-migrate/pulls)5MITPHP

Since Apr 3Pushed 8y ago3 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (5)Used By (5)

Yii2 Migrate v1.0
=================

[](#yii2-migrate-v10)

Extended database migration support for Yii2.

Description
-----------

[](#description)

By default (as of `2.0.1`), Yii only looks in a single directory to apply/revert database migrations. You are able to override the directory to search in via the `--migrationPath` option, however, this is only useful in applying/reverting a small subset of migrations, and not an entire system as a whole.

\####Use case A large system may contain a significant amount of individually maintained extensions/modules. If these individual packages interact with the database in any way, they may each contain their own set of database migrations. Moreover, different extensions/modules may require as dependencies additional packages, and the migrations for these packages need to be carefully applied in the order they were created. Currently, this would have to be completed manually by the developer, as Yii's native migration support can only look in one directory at a time.

This extension solves that problem, by allowing you to specify a range of directories in which the migration command should iterate through to attempt to locate migrations. In that way, systems with migrations in 100+ directories can be easily maintained by simply registering that directory.

Installation
------------

[](#installation)

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

- Either run

```
php composer.phar require --prefer-dist "fishvision/yii2-migrate" "*"

```

or add

```
"fishvision/yii2-migrate" : "*"
```

to the require section of your application's `composer.json` file.

- Add a new controller map in `controllerMap` section of your application's configuration file, for example:

```
'controllerMap' => [
    'migrate' => [
        'class' => 'fishvision\migrate\controllers\MigrateController',
        'autoDiscover' => true,
        'migrationPaths' => [
            '@vendor/fishvision',
        ],
    ],
],
```

Options
-------

[](#options)

OptionTypeDescription`autoDiscover``bool`If true, the application will recursively look for additional migrations within the directories specified by `migrationPaths``migrationPaths``array`An array of path aliases to recursively look under for additional migrations.Usage
-----

[](#usage)

```
./yii migrate

```

***Note***: extension does not make any changes to the default migration usage. It simply alters the paths in which to look for migrations.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~143 days

Total

4

Last Release

3267d ago

Major Versions

0.0.0 → 1.02016-04-03

0.0.1 → 1.0.12017-06-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/91d230d252aa18318a9a809381a62f0e8bfbd74f8591d15a2ce9dac954e3e5fa?d=identicon)[alexberriman](/maintainers/alexberriman)

---

Top Contributors

[![alexberriman](https://avatars.githubusercontent.com/u/2680172?v=4)](https://github.com/alexberriman "alexberriman (2 commits)")[![ArtemShapovalov](https://avatars.githubusercontent.com/u/2452373?v=4)](https://github.com/ArtemShapovalov "ArtemShapovalov (1 commits)")[![janvogt](https://avatars.githubusercontent.com/u/3130210?v=4)](https://github.com/janvogt "janvogt (1 commits)")

---

Tags

yii2extension

### Embed Badge

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

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

###  Alternatives

[dmstr/yii2-db

Database extensions

19618.8k6](/packages/dmstr-yii2-db)[sjaakp/yii2-spatial

Yii2 ActiveRecord supporting MySQL spatial data

1873.8k1](/packages/sjaakp-yii2-spatial)

PHPackages © 2026

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