Generate migration from existing database?

Hello,

I would like to get started using Yii’s new migration feature. I have a large existing database. I’m curious if it’s possible to generate a migration based on an existing database? Or is this something that needs to be done by hand?

I could just read in an SQL file as the initial migrate, but I’d like it to be database independent so I can do unit testing with SQLite.

Thank you!

No, currently there’s no such tool.

Since this thread is the first result on Google for ‘yii generate migration from existing database’, I figure I should share what I have found:

Initial DB Migration Command

Looks like it does the trick!