开发者

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

In r开发者_Go百科ails, 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


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..


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.


I suggest you try fuelphp framework (http://fuelphp.com) which has excellent scaffold function as well as other amazing functions. It used PHP 5.3.


Doctrine 2 has a migrations component. It's completely separate from the ORM, so you don't have to be using Doctrine to use this. This is probably the most popular solution right now.

It does require php 5.3 though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜