On Apr 12, 2012, at 4:18 AM, limodou wrote:

> I also have other requirements:
> 
> 1. if there is no changes should it can create nothing, not like this:
> 
> def upgrade():
>    ### commands auto generated by Alembic - please adjust! ###
>    pass
>    ### end Alembic commands ###
> 
> 
> def downgrade():
>    ### commands auto generated by Alembic - please adjust! ###
>    pass
>    ### end Alembic commands ###

that's what it should be doing what are you getting ?


> 
> 2. If I can merge the current changes into head revision, before I
> execute upgrade, so that I can combine several changes into one
> change. For me, I think just remove the head revision, and recreate
> new one that's ok. And only problem I think is that : if the user has
> manually changed the revision file, the changes will be lost.

right, that's a problem, so easiest here is to just delete the head file 
yourself and re-run autogenerate.   Alembic isn't going to delete files nor is 
it going to merge into an existing file - the first is too much of a surprise, 
the second is far too complicated for this kind of tool.  "KISS" applies....


-- 
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