On Apr 20, 2012, at 4:52 AM, Wichert Akkerman wrote:

> 
> That suggests that every package would have its own migration tool, which is 
> not very practical from a sysadmin point of view. I am an upgrading an 
> application I want to be able to run all necessary migrations for all 
> components of an application in one run. I do not want to be required to 
> figure out which packages an application was running and then migrate them 
> all separately. So I definitely see a need for an upgrade framework that can 
> deal with multiple packages.

in my view every package which deals with it's own schema objects would at 
least have to maintain it's own migration files - not it's own migration 
"tool", but assuming an Alembic setup, each would have at least a rudimentary 
Alembic environment and individual migration files.    You could then run each 
migration environment individually, or write a short coordination script within 
the main application that calls upon all of them.  Assuming the packages either 
have no schema dependencies on each other, or dependencies without cycles, the 
correct "order" of which set of scripts to be run could just be hardcoded 
within the main application.   i think when one writes an application M that 
makes use of libraries A, B, and C, it's not unreasonable that M would have to 
include some top-level configuration for A, B, and C, that is, adding each one 
to a list of packages in which to locate an alembic environment and run 
upgrades.   Or there would be some other usage contract between A, B, C and M 
that allows for publishing of "migration" handles.

What I don't see is that application M has within it migration scripts specific 
to A, B and C.   A, B and C should maintain the knowledge of their own schemas 
and how they need to be upgraded for new versions of A, B and C I would think.

The one thing that's needed as far as Alembic is concerned is the ability to 
control the name of the actual "migration" table per environment, this is a 
short feature add that's been sitting as an enhancement request for some time 
now.


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to