Re: [sqlalchemy] Using UniqueConstraint or unique=True :p:

2013-05-06 Thread Paradox
On 05/03/2013 04:18 PM, Simon King wrote: On Thu, May 2, 2013 at 11:43 PM, Paradox para...@pobox.com wrote: CREATE TABLE user (lname string, fname string, email string, unique(lname, fname) ON CONFLICT REPLACE); This will allow me to add multiple rows with the same lname as long as the fnames

Re: [sqlalchemy] Using UniqueConstraint or unique=True

2013-05-03 Thread Simon King
On Thu, May 2, 2013 at 11:43 PM, Paradox para...@pobox.com wrote: I am trying to ensure that my table doesn't allow duplicate rows. The table is defined (in SqlAlchemy 0.8): class User(Base): __tablename__ = 'user' id = Column(Integer, primary_key=True) lname =

[sqlalchemy] Using UniqueConstraint or unique=True

2013-05-02 Thread Paradox
I am trying to ensure that my table doesn't allow duplicate rows. The table is defined (in SqlAlchemy 0.8): class User(Base): __tablename__ = 'user' id = Column(Integer, primary_key=True) lname = Column(String) fname = Column(String) email = Column(String)