Php – Yii Framework 2.0 Migration with existing database

databasemigrationPHPreverse-engineeringyii2

I know the concept of Yii framework 2.0 migrations. Let's say we generate migrations source code and run the command, the database tables will be created based on the source code. Is it possible to create migrations source code based on the existing database? With source code I do not mean the model, the controller or the CRUD classes but I mean the migrations source code. It is some kind of reverse engineer.

Best Answer

The following yii2 extension generates migration scripts from an existing MySQL, MSSQL, PgSQL or SQLite database:

www.yiiframework.com/extension/yii2-migration-utility/

Source: www.github.com/c006/yii2-migration-utility