Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any PHP framework's scaffolding that can generate migration like Ruby on Rails?

In rails, when generating model, migration is created also. I'm wondering any PHP framework can do it also?

I'm trying Yii framework now, but seems like I need to generate the migration manually first then generate a model. (or even a third step to generate CRUD :-/)

Thanks

like image 346
vk.edward.li Avatar asked Jun 20 '11 15:06

vk.edward.li


2 Answers

CakePHP has a migrations plugin, as well as bake console which creates a file to generate your current schema and stuff. I think this might be what you need..

like image 178
Dunhamzzz Avatar answered Sep 27 '22 21:09

Dunhamzzz


I believe the old Yii dbmigrations extension is obsolete in favor of Yii's built-in migration functions available since Yii 1.1.6: http://www.yiiframework.com/doc/guide/1.1/en/database.migration However, it does seem like the OP may have tried that already as was not happy with the amount of manual work still involved compared to his experience with RoR.

like image 28
ldg Avatar answered Sep 27 '22 23:09

ldg