Re: [sqlalchemy] Composite foreign key constraints

2010-03-13 Thread Michael Bayer
On Mar 13, 2010, at 7:26 AM, sqlalch...@lists.fastmail.net wrote: > > class Period(Base): >__tablename__ = "period" > >id = Column(Integer, primary_key=True) >date = Column(Date, nullable=False) >hour = Column(SmallInteger, nullable=False) > >__table_args__ = ( >Uni

[sqlalchemy] Composite foreign key constraints

2010-03-13 Thread sqlalchemy
First of all I realise this question might be more of a design choice question than a technical issue. The issue I am facing is creating a model reflecting a situation where multiple tables all contain data for a particular period. This period consists of both a date and an hour, these two can not