I\'m trying to come up with (or find) a reusable system for database schema versioning in php projects.
There are a number of Rails-style migration projects available fo
Well, I wasn't able to find any reason not to move forward.
The project, such as it is, is here:
http://github.com/Billiam/MySQL-PHP-AutoMigrations
Needs some love (accurate comments, unit testing, actual bug testing), but seems to be working well for me now.
It's a fork of http://code.google.com/p/mysql-php-migrations/ to include the ideas above, and some other little stuff.
Migrating down is done from methods saved in the database on the way up so that file changes (like those when switching between branches) do not affect downward migrations. Added two functions:
Still very open to hearing potential (or even expected) pitfalls from this approach however.