Thanks a lot Mike!

On Wednesday, October 31, 2018 at 7:43:51 PM UTC+1, Mike Bayer wrote:

> here's the issue: 
>
>
> https://bitbucket.org/zzzeek/alembic/issues/515/system-true-not-generated-for-column
>  
> <https://www.google.com/url?q=https%3A%2F%2Fbitbucket.org%2Fzzzeek%2Falembic%2Fissues%2F515%2Fsystem-true-not-generated-for-column&sa=D&sntz=1&usg=AFQjCNHl8pc8qFcNHFFEcHTwrEWF415Qug>
>  
>
> and here is a patch to resolve: 
>
> https://gerrit.sqlalchemy.org/#/c/zzzeek/alembic/+/910 
>
> On Wed, Oct 31, 2018 at 11:49 AM Riccardo Magliocchetti 
> <riccardo.ma...@gmail.com <javascript:>> wrote: 
> > 
> > Il 31/10/18 16:32, Mike Bayer ha scritto: 
> > > On Wed, Oct 31, 2018 at 11:00 AM Riccardo Magliocchetti 
> > > <riccardo.ma...@gmail.com <javascript:>> wrote: 
> > >> 
> > >> Hello, 
> > >> 
> > >> we'd like to use Postgresql xmin column for optimistic concurrency, 
> so we declared the column as: 
> > >> 
> > >>      xmin = Column("xmin", Integer, system=True, 
> server_default=FetchedValue()) 
> > >> 
> > >> 
> > >> The problem is when autogenerating a migration with alembic (via 
> flask-migrate) the xmin column is added to 
> > >> the operations so the migrations fails. 
> > > 
> > > is the column generated inside the migration including the 
> > > "system=True" flag?   if that flag is present then the column won't be 
> > > created.    Or are you referring to an alter table operation?    Need 
> > > specifics on the failure and then we need to post a bug report if 
> > > there is in fact a problem. 
> > 
> > It's a create table, the flag is not there: 
> > 
> >      op.create_table('user', 
> >       ... 
> >      sa.Column('xmin', sa.Integer(), server_default=FetchedValue(), 
> nullable=True), 
> > 
> > 
> > 
> > -- 
> > Riccardo Magliocchetti 
> > @rmistaken 
> > 
> > http://menodizero.it 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sqlalchemy-alembic" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sqlalchemy-alembic+unsubscr...@googlegroups.com <javascript:>. 
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to