PHPackages                             tmukherjee13/yii2-reverse-migration - 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. tmukherjee13/yii2-reverse-migration

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

tmukherjee13/yii2-reverse-migration
===================================

Generate working migration classes from existing Database

2.4.0(4y ago)2322.0k↓77.7%11BSD-3-ClausePHP

Since Jan 23Pushed 2y ago4 watchersCompare

[ Source](https://github.com/tmukherjee13/yii2-reverse-migration)[ Packagist](https://packagist.org/packages/tmukherjee13/yii2-reverse-migration)[ RSS](/packages/tmukherjee13-yii2-reverse-migration/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (1)Versions (18)Used By (0)

Yii2 Reverse Migration
======================

[](#yii2-reverse-migration)

[![Latest Stable Version](https://camo.githubusercontent.com/1246708c7139956c815fed8af2dc0c027b9b566e7350932a94a6aff0fc40cc86/68747470733a2f2f706f7365722e707567782e6f72672f746d756b6865726a656531332f796969322d726576657273652d6d6967726174696f6e2f762f737461626c65)](https://packagist.org/packages/tmukherjee13/yii2-reverse-migration)[![License](https://camo.githubusercontent.com/80fad6a5b3bd32e476396d514e5890f459e294286ee5246feb5086c410a1d9eb/68747470733a2f2f706f7365722e707567782e6f72672f746d756b6865726a656531332f796969322d726576657273652d6d6967726174696f6e2f6c6963656e7365)](https://packagist.org/packages/tmukherjee13/yii2-reverse-migration)[![Total Downloads](https://camo.githubusercontent.com/485ab936b0365d9815d614a0dc22ba7dad3ff6286cf36c27441c35b0cd0e9bd6/68747470733a2f2f706f7365722e707567782e6f72672f746d756b6865726a656531332f796969322d726576657273652d6d6967726174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/tmukherjee13/yii2-reverse-migration)[![Monthly Downloads](https://camo.githubusercontent.com/7756ee9a5e99f98d7b027afc14c52bea5038b7b7cb65c9022be648f937cda961/68747470733a2f2f706f7365722e707567782e6f72672f746d756b6865726a656531332f796969322d726576657273652d6d6967726174696f6e2f642f6d6f6e74686c79)](https://packagist.org/packages/tmukherjee13/yii2-reverse-migration)[![Daily Downloads](https://camo.githubusercontent.com/5b9de76dd05863369d1128e9710b6a549254f6c252c0dc2d4621b57c4b588346/68747470733a2f2f706f7365722e707567782e6f72672f746d756b6865726a656531332f796969322d726576657273652d6d6967726174696f6e2f642f6461696c79)](https://packagist.org/packages/tmukherjee13/yii2-reverse-migration)[![Scrutinizer Build](https://camo.githubusercontent.com/d0401668054a05276ea1ece0cd3e1f6bfb25cd02beb7450663399d54eeaceb0e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f66696c702f77686f6f70732e7376673f6d61784167653d32353932303030)](https://scrutinizer-ci.com/g/tmukherjee13/yii2-reverse-migration/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4742cb8615e4054bae1d0d0500f8e4498353ecc5db34c3f36d906d126c014761/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746d756b6865726a656531332f796969322d726576657273652d6d6967726174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tmukherjee13/yii2-reverse-migration/?branch=master)

Generate working migration classes from existing Database

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist tmukherjee13/yii2-reverse-migration "*"

```

or add

```
"tmukherjee13/yii2-reverse-migration": "*"

```

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

Usage
-----

[](#usage)

Once the extension is installed, Add the following in console.php:

```
return [
    ...
    'components' => [
        ...
    ],
    'controllerMap' => [
        'migration' => [
            'class' => 'tmukherjee13\migration\console\controllers\MigrationController',
            'templateFile' => '@tmukherjee13/migration/views/template.php',
        ],
    ],
    ...
];
```

then you can use the migration command as follows:

for table migration,

```
yii migration/table

```

or

```
yii migration/table ,

```

for data migration,

```
yii migration/data

```

or

```
yii migration/data ,

```

to create migration of whole schema,

```
yii migration/schema

```

yii2-reverse-migration
======================

[](#yii2-reverse-migration-1)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~210 days

Recently: every ~673 days

Total

15

Last Release

863d ago

Major Versions

v0.1 → v1.02016-01-24

v1.2 → v2.02016-08-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/a1c0309df8d5e35e8a27ebff97e637fb981fe299c3790e44fa6863c903e5775c?d=identicon)[tmukherjee13](/maintainers/tmukherjee13)

---

Top Contributors

[![tmukherjee13](https://avatars.githubusercontent.com/u/6323758?v=4)](https://github.com/tmukherjee13 "tmukherjee13 (21 commits)")[![cornernote](https://avatars.githubusercontent.com/u/51875?v=4)](https://github.com/cornernote "cornernote (1 commits)")[![deepsource-io[bot]](https://avatars.githubusercontent.com/in/16372?v=4)](https://github.com/deepsource-io[bot] "deepsource-io[bot] (1 commits)")[![des1roer](https://avatars.githubusercontent.com/u/10970793?v=4)](https://github.com/des1roer "des1roer (1 commits)")[![lomotech](https://avatars.githubusercontent.com/u/7269466?v=4)](https://github.com/lomotech "lomotech (1 commits)")[![pitonn](https://avatars.githubusercontent.com/u/9163188?v=4)](https://github.com/pitonn "pitonn (1 commits)")[![buibr](https://avatars.githubusercontent.com/u/13014527?v=4)](https://github.com/buibr "buibr (1 commits)")[![waldopanozo](https://avatars.githubusercontent.com/u/8824149?v=4)](https://github.com/waldopanozo "waldopanozo (1 commits)")

---

Tags

migrationdatabaseyii2

### Embed Badge

![Health badge](/badges/tmukherjee13-yii2-reverse-migration/health.svg)

```
[![Health](https://phpackages.com/badges/tmukherjee13-yii2-reverse-migration/health.svg)](https://phpackages.com/packages/tmukherjee13-yii2-reverse-migration)
```

###  Alternatives

[bizley/migration

Migration generator for Yii 2.

296389.5k11](/packages/bizley-migration)[yii2tech/illuminate

Yii2 to Laravel Migration Package

11416.2k](/packages/yii2tech-illuminate)[dmstr/yii2-db

Database extensions

19656.2k6](/packages/dmstr-yii2-db)[hzhihua/yii2-dump

Generate the schema from an existing database

1829.6k1](/packages/hzhihua-yii2-dump)[spanjeta/yii2-backup

Database Backup and Restore functionality

285.4k1](/packages/spanjeta-yii2-backup)

PHPackages © 2026

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