Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
On Fri, Apr 13, 2012 at 8:48 AM, Michael Bayer wrote: > > On Apr 12, 2012, at 8:07 PM, limodou wrote: > >> >> For example, in my case, when I made some changes and I want to test >> them, so I can run "revision --autogenerate" and "upgrade" the >> database. And then I made other changes, and do th

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread Michael Bayer
On Apr 12, 2012, at 8:07 PM, limodou wrote: > > For example, in my case, when I made some changes and I want to test > them, so I can run "revision --autogenerate" and "upgrade" the > database. And then I made other changes, and do the cycle again I can > do this way. But sometimes I just change

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
On Thu, Apr 12, 2012 at 11:59 PM, Michael Bayer 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 hea

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
On Thu, Apr 12, 2012 at 11:52 PM, Michael Bayer wrote: > > On Apr 12, 2012, at 10:50 AM, limodou wrote: > > On Thu, Apr 12, 2012 at 10:39 PM, Michael Bayer > wrote: > > > On Apr 12, 2012, at 4:18 AM, limodou wrote: > > > I also have other requirements: > > > 1. if there is no changes should it ca

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread Michael Bayer
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 probl

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread Michael Bayer
On Apr 12, 2012, at 10:50 AM, limodou wrote: > On Thu, Apr 12, 2012 at 10:39 PM, Michael Bayer > wrote: >> >> 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(

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
>>> 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 c

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
On Thu, Apr 12, 2012 at 10:39 PM, Michael Bayer wrote: > > 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

Re: [sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread Michael Bayer
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 do

[sqlalchemy] Re: About alembic alter column problem

2012-04-12 Thread limodou
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 ad