On Tue, 21 Mar 2006, Justin Johnson wrote:

 Lastly, it would be great if there could be some collaboration on a
 combined administration/migration tool, similar in scope to
 sqlobject-admin.  ORM-specific administration isn't really very useful
 -- especially when you can't be sure the ORM describes anything
 similar to what some legacy database looks like (before the upgrade).
 And the kinds of functions you want to upgrade a database (ALTERs and
 table introspection, etc) are relatively uncommon in everyday database
 use, so including them in an ORM is unnecessary scope creep.  I think
 a cross-ORM tool (and just as applicable to no ORM) would be an easy
 place for collaboration.

I was hoping to get around to implementing a migration system similar to RoR's migration system. It's being used to good effect in production environments.

It's not perfect but it's at least an attempt to provide a managable framework for upgrades (and downgrading if necessary). It essentially works by having up() and down() methods in a Migrator class which contain functionality to upgrade/downgrade respectively. It's not automated - the methods contain the necessary calls to create/remove fields and populate data etc if they need to.

Let me just chime in with my idea of the holy grail here: Assuming the Python code is stored in SVN, the Python code should detect what SVN revision the database is consistent with. Knowing that, it could generate the migration code via the diffs between the models in SVN....

-- Asheesh.

--
The future is a myth created by insurance salesmen and high school counselors.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to