On May 21, 2010, at 10:13 AM, Chris Withers wrote:

> Michael Bayer wrote:
>> It's not clear that Alembic has real advantages over Migrate.  Its
>> simpler for sure since it only is for SQLA 0.6 and up and doesn't
>> attempt to do the crazy things Migrate does like versioning SQLite
>> databases.  I'm going to attempt to handle branching (but already
>> that means, ugly hex digest version numbers).  
> 
> I'm glad that handling branching is something I don't even want to ever 
> contemplate ;-)
> (which undoubtably means I'll need to do it next week!)
> To clarify; Alembic supports branching, Migrate doesn't?
> (and where can I find out exactly what is meant by branching?)

it means if you have a branch of the repo, so say you start with source A with 
versions:


1
2
3

then you branch into B.   A continues to get more versions:

4
5
6

B also gets more versions:

4
5
6
7


so now you want to merge B back to A.   because migrate is counting with 
integers, you're out of luck.  You have to renumber your files somehow so that 
they all work out.

What I'm doing, you still might have an uphill battle if A and B have 
non-compatible migrations, but we're using randomly generated hex ids:

a65fe
47aed
277eef

and the ordering of versions is done using a "link" from one version to the 
previous, which is literally just a variable inside the file   
"previous_version = '47aed'".    So you can merge two branches together, and 
there will be a command that modifies the "previous_version" identifier for you 
so that it does a splice.  it will also add a "mediating" version in between 
them in case something needs to be done to bring B into A.

its still kind of confusing but is more along the way.



> 
>> It also doesn't have any of the schema comparison stuff Migrate
>> has, which seems to be the kind of thing people want (Ken's request
>> is not the first I've heard).  Migrate could improve a lot on that
>> feature if they use the new Inspector interface in 0.6.
> 
> Would you be interested in patches that added this kind of functionality to 
> Alembic using the new Inspector interface?

yes, but I'd rather you keep working on declarative Mixin issues :)   (there's 
more in trac).


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

Reply via email to