Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yii Framework 2.0 Migration with existing database

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.

like image 285
O Connor Avatar asked Jan 12 '15 15:01

O Connor


1 Answers

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

like image 93
Fory Avatar answered Sep 17 '22 09:09

Fory