Re: [sqlalchemy] How to handle unique constraint for multiple columns containing null values using sqlachemy?

2018-11-06 Thread Mike Bayer
I should add, please specify which backend you're using and what DDL sequence you are looking to emit. On Tue, Nov 6, 2018 at 3:21 PM Mike Bayer wrote: > > On Tue, Nov 6, 2018 at 2:54 PM wrote: > > > > Hi, > > > > I find that `UniqueConstraint` from `sqlachemy` and > >

Re: [sqlalchemy] How to handle unique constraint for multiple columns containing null values using sqlachemy?

2018-11-06 Thread Mike Bayer
On Tue, Nov 6, 2018 at 2:54 PM wrote: > > Hi, > > I find that `UniqueConstraint` from `sqlachemy` and > `op.create_unique_constraint` by `alembic`, it cannot handle multiple columns > that contain null values. > > I saw we can solve using SQL commands via some tricky ways like creating >

[sqlalchemy] How to handle unique constraint for multiple columns containing null values using sqlachemy?

2018-11-06 Thread lydia
Hi, I find that `UniqueConstraint` from `sqlachemy` and `op.create_unique_constraint` by `alembic`, it cannot handle multiple columns that contain null values. I saw we can solve using SQL commands via some tricky ways like creating unique index and coalesce, do we have some ways using