开发者

how to handle database/table changes in PHP?

Ok so now I have this problem i need to add a "balance" column for my开发者_如何转开发 users table. I am using the Zend framework and I was hoping to use this one here:

http://framework.zend.com/wiki/display/ZFPROP/Zend_Db_Schema_Manager+-+Rob+Allen#Zend_Db_Schema_Manager-RobAllen-6.Milestones%2FTasks

Unfortunately i suppose it never got into the implementation stage and there's just the header file, the imeplementation file is nowhere to be downloaded.

Would you guys have any suggestion? I don't want to go to 5 mysql database and add manually the column i need - at the same time i don't want to be doing it this way everytime i need to make any db changes. I need something like the zend schema manager component.


I'm currently using Akrabat_Db_Schema_Manager as a database migration tool. It's written in Zend Framework and is pretty straightforward, all database changes should be written in raw SQL.

You can also take a look at Doctrine Migration Tool. It allows you to write migrations using only Doctrine objects, thus skipping writing raw SQL part. Not sure if it exists for Doctrine 2.0 though.

More insights here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜