[sqlalchemy] Re: Self referencing keys

2007-09-03 Thread sdobrev
A pointing to A, is cyclical dependency. same as A -> B -> A. but in latter case u must choose one of the links to be added later, that is use_later=True for ForeignKey. in former case the table declaration may or may not work without use_alter. in both cases u need post_update=True for the re

[sqlalchemy] Re: Self referencing keys

2007-09-03 Thread sdobrev
On Monday 03 September 2007 19:57:54 voltron wrote: > would this work? > > users = Table("users", metadata, > Column("id",Integer,primary_key=True), > Column("username", String(50),unique=True, > nullable=False), > Column("password", String(255)), >

[sqlalchemy] Re: Self referencing keys

2007-09-03 Thread voltron
would this work? users = Table("users", metadata, Column("id",Integer,primary_key=True), Column("username", String(50),unique=True, nullable=False), Column("password", String(255)), Column("email", String(255),unique=True, nullable=Fal