Re: [sqlalchemy] Compound unique constraint with a nullable column

2014-11-18 Thread Guido Winkelmann
On Monday 17 November 2014 14:44:02 Michael Bayer wrote: On Nov 17, 2014, at 1:55 PM, Guido Winkelmann gu...@ambient-entertainment.de wrote: Am Montag, 17. November 2014 16:25:54 UTC+1 schrieb Michael Bayer: On Nov 17, 2014, at 7:37 AM, Guido Winkelmann gu...@ambient-entertainment.de

[sqlalchemy] Compound unique constraint with a nullable column

2014-11-17 Thread Guido Winkelmann
Hi, How can I go about having a cross-platform compatible compound unique constraint over two columns where there can be only one record with NULL in one column and a given value in the other? I want something like this: UniqueConstraint(parent_id, name) except parent_id is nullable, and I

Re: [sqlalchemy] Compound unique constraint with a nullable column

2014-11-17 Thread Michael Bayer
On Nov 17, 2014, at 7:37 AM, Guido Winkelmann gu...@ambient-entertainment.de wrote: Hi, How can I go about having a cross-platform compatible compound unique constraint over two columns where there can be only one record with NULL in one column and a given value in the other? I

Re: [sqlalchemy] Compound unique constraint with a nullable column

2014-11-17 Thread Guido Winkelmann
Am Montag, 17. November 2014 16:25:54 UTC+1 schrieb Michael Bayer: On Nov 17, 2014, at 7:37 AM, Guido Winkelmann gu...@ambient-entertainment.de javascript: wrote: Hi, How can I go about having a cross-platform compatible compound unique constraint over two columns where there can be

Re: [sqlalchemy] Compound unique constraint with a nullable column

2014-11-17 Thread Michael Bayer
On Nov 17, 2014, at 1:55 PM, Guido Winkelmann gu...@ambient-entertainment.de wrote: Am Montag, 17. November 2014 16:25:54 UTC+1 schrieb Michael Bayer: On Nov 17, 2014, at 7:37 AM, Guido Winkelmann gu...@ambient-entertainment.de javascript: wrote: Hi, How can I go about having a