On Thu, Apr 12, 2012 at 11:59 PM, Michael Bayer
<mike...@zzzcomputing.com> wrote:
>
> On Apr 12, 2012, at 10:54 AM, limodou wrote:
>
>>>>> 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....
>>>>
>>>
>>> So if it can be an option to let user to decide if he want to remove
>>> the head revision will be handful. User knows what they want to do. I
>>> just don't want to delete the file manually.
>>>
>>
>> BTW, the head I said just suit for those which have not be upgraded
>> yet. So if the head revision is already upgraded, then it'll not be
>> deleted.
>>
>> And If you like I can try to make some patches for these two demands.
>
> here's what I can do, since I will grant that "rm" is inconvenient in that 
> you have to type the path to the file:
>
> alembic rm <revision>
>
> will delete revision files, including a range like "alembic rm 5ea:head"
>
> it must include an "are you sure?" dialog after it emits the pathnames of the 
> files it will delete.
>

great, This way maybe better.

-- 
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
UliWeb <<simple web framework>>: http://code.google.com/p/uliweb/
My Blog: http://hi.baidu.com/limodou

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@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