[sqlalchemy] null values in multi column unique index

2013-05-06 Thread gvv
Hi All, using 8.1 class Company(Base): __tablename__ = 'Company' Id = Column(Integer, primary_key=True) class ProductClass(Base): __tablename__ = 'ProductClass' Id = Column(Integer, primary_key=True) Company_Id = Column(Integer, ForeignKey(Company.Id,

Re: [sqlalchemy] null values in multi column unique index

2013-05-06 Thread Michael Bayer
this depends on the database you're using, and I'd google around for stack overflow information on how to implement unique values with NULLs allowed. For example here is postgresql: http://dba.stackexchange.com/questions/9759/postgresql-multi-column-unique-constraint-and-null-values and