On Mon, Sep 26, 2011 at 11:05 PM, Michael Bayer wrote:
> On Sep 26, 2011, at 2:50 AM, Nathan Robertson wrote:
>
>> Column('custid', Integer, Sequence('test.customer_custid_seq'),
>> primary_key=True),
>
> for the Sequence, as with all schema items, you need to specify the "schema"
> portion separately so that SQLAlchemy knows where each token starts and ends:
>
> Sequence("customer_custid_seq", schema="test")
Actually, I just noticed that the same thing doesn't apply to foreign
keys. I've actually got code in production which does something like:
Column('custid', BigInteger, ForeignKey('test.customer.custid'),
primary_key=True)
What's the reason for the distinction requiring the schema to be split
out in a Sequence, but not in the case of a ForeignKey?
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.