Good DB Migrations for CakePHP?
- by Martin Westin
Hi,
I have been trying a few migration scripts for CakePHP but I ran into problems with all of the in some form or another.
Please advice me on a migration option for Cake that you use live and know works.
I'd like the following "features":
-Support CakePHP 1.2(e.g. CakeDCs migrations will only be an option when 1.3 is stable and my app migrated to the new codebase)
-Support for (or at least not halt on) Models with a different database config.
-Support Models in sub-folders of app/models
-Support Models in plugins
-Support tables that do not conform to Cake conventions (I have a few special tables that do not have a single primary key field and need to keep them)
-Plays well with automated deployment via Capistrano and Git.
I do not need rails-style versioned files a git versioned schema file that is compared live to the existing schema will do. That is: I like the SchemaShell in Cake apart from it not being compatible with most of my requirements above.
I have looked at and tested:
CakePHP Schema Shell http://book.cakephp.org/view/734/Schema-management-and-migrations
CakeDC migrations http://cakedc.com/downloads/view/cakephp_migrations_plugin
YAML migrations http://github.com/georgious/cakephp-yaml-migrations-and-fixtures
joelmoss migrations http://code.google.com/p/cakephp-migrations