PHPackages                             kubo0/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kubo0/yii2-migrate

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

kubo0/yii2-migrate
==================

Yii2 migration assistant

36PHP

Since Nov 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/KUbo0/yii2-migrate)[ Packagist](https://packagist.org/packages/kubo0/yii2-migrate)[ RSS](/packages/kubo0-yii2-migrate/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-migrate
============

[](#yii2-migrate)

Migration assistant

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

[](#installation)

Console app configuration:

```
return [
...
    'controllerMap' => [
        'migrate' => [
            'class' => 'kubo0\migrate\controllers\MigrateController',
            'templateFile' => 'kubo0\migrate\views\MigrationAsArray.php',
        ],
    ],
...
];

```

Features
--------

[](#features)

### Generate migration schema for existing table

[](#generate-migration-schema-for-existing-table)

`yii migrate/get-schema` from `kubo0\migrate\controllers\MigrateController` generate migration schema for all db tables if not specified.

### Bidirectional migration over array schema

[](#bidirectional-migration-over-array-schema)

When you create a new table, the original way is comfy, but if you have to deal with the development of an existing table migration, the original one can confuse.

#### Commands avaible over array

[](#commands-avaible-over-array)

`yii migrate/create` generate template from `kubo0\migrate\views\MigrationAsArray.php`

- createTable, renameTable - yes
- dropTable, truncateTable - no
- addColumn, dropColumn - yes
- renameColumn, alterColumn - yes
- addPrimaryKey, dropPrimaryKey - yes
- addForeignKey, dropForeignKey - no
- createIndex, dropIndex - yes
- addCommentOnColumn, addCommentOnTable - no
- dropCommentFromColumn, dropCommentFromTable - no
- execute, insert, batchInsert, update, delete - not planning

#### Usage

[](#usage)

Modify array to your purpose. Don't use same keys as names in same array. If you need to rename one table and on it's place create other with same name use 'tableName' insted of key;

and `./yii migrate/up` or `down` will apply and rollback migration.

tips used from

Sqlite and comments
-------------------

[](#sqlite-and-comments)

If your migration contains comments just add `kubo0\migrate\traits\MigrationSqliteCommentTrait` in it

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% 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.

### Community

Maintainers

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

---

Top Contributors

[![Begalov](https://avatars.githubusercontent.com/u/437009?v=4)](https://github.com/Begalov "Begalov (11 commits)")[![Nurzumspaserin](https://avatars.githubusercontent.com/u/144473711?v=4)](https://github.com/Nurzumspaserin "Nurzumspaserin (2 commits)")

---

Tags

migrationyii2

### Embed Badge

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

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

###  Alternatives

[heyupdate/emoji

Convert unicode and named (i.e. :smile:) Emoji into images

55102.4k3](/packages/heyupdate-emoji)[wotz/unique-codes

Generate unique, random-looking codes

1363.3k](/packages/wotz-unique-codes)[jdsdev/craft-embedder

Generate video embed code.

699.9k](/packages/jdsdev-craft-embedder)[hostnet/entity-tracker-component

Provides an event when a Tracked entity changes

16158.1k4](/packages/hostnet-entity-tracker-component)[glhd/special

1929.4k](/packages/glhd-special)[ramsey/identifier

A PHP library for generating and working with identifiers, including UUIDs, ULIDs, and Snowflakes

603.0k1](/packages/ramsey-identifier)

PHPackages © 2026

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