Alan Pinstein | 18 Jul 2009 07:39
Picon
Gravatar

[propel-dev] DB Migrations Architecture

Hi All-

I have finally completed a working version of my migrations system. I  
am calling it MP, for "Migrations for PHP", and it is a generalized  
solution not tied to any framework or ORM. However, it has a full API  
and is actually intended to be integrated with such systems.

I've got the project hosted on GitHub: http://github.com/apinstein/mp/tree/master

A little blurb on it:
MP keeps your migrations in order.

MP is a generic migrations architecture for managing migrations  
between versions of a web application.

It can be used to migration database schemas as well as perform  
arbitary code during upgrades and downgrades.

HOW IT WORKS
MP keeps track of the current version of your application. You can  
then request to migrate to any version.

MP also has a "clean" function which allows you to reset your  
application to "version 0". There is a clean() callback
which allows you to programmatically return your application to a  
pristine state when migrating with the "clean" option.
------

It would be pretty trivial to integrate with propel so that it can be  
used from propel-gen or maybe even a separate wrapper like propel- 
(Continue reading)


Gmane