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

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

xiaochengfu/yii2-migrate
========================

yii2 database migration

v1.1.2(9y ago)119BSD-3-ClausePHPPHP &gt;=5.4.0

Since Feb 25Pushed 9y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

database migration
==================

[](#database-migration)

yii2 database migration ,it is easy!

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

[](#installation)

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

Either run

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

```

or add

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

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

网页端使用:

1.在 backend/config/main.php 添加如下配置

```
'modules' => [
        'migration' => [
            'class' => 'xiaochengfu\migrate\Module',
        ]
    ],

```

2.在你的后台访问

演示地址：

命令行使用方法:

1.在`console/config/main.php` 添加如下配置

```
'controllerMap' => [
        'migrate' => [
                    'class' => 'xiaochengfu\migrate\console\MigrateController',
                    'useTablePrefix' => true,
                    'migrationPath' => '@console/migrations',
                ],
    ],

```

2.将迁移文件转存,及备份 `php yii migrate/dump`

3.还原指定文件

`php yii migrate/to m170420_151515_migration.php`

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~18 days

Total

4

Last Release

3308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a10742992d52a3b211ea0790e1db0e1eb0c4230296b34b290457fa520a8d4ef?d=identicon)[xiaochengfu](/maintainers/xiaochengfu)

---

Top Contributors

[![xiaochengfu](https://avatars.githubusercontent.com/u/15496255?v=4)](https://github.com/xiaochengfu "xiaochengfu (12 commits)")

---

Tags

yii2-database-migrationyii2extension

### Embed Badge

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

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

###  Alternatives

[dmstr/yii2-migrate-command

Console Migration Command with multiple paths/aliases support

31295.5k6](/packages/dmstr-yii2-migrate-command)[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)
