Hi!

I have people_table:

people_table = sa.Table('people', meta.metadata,
    sa.Column('id', sa.types.Integer, primary_key=True,
autoincrement=False),
    sa.Column('street_id', sa.types.Integer,
sa.ForeignKey('streets.id'), nullable=False),
    sa.Column('first_name', sa.types.Unicode(255), nullable=True),
    sa.Column('last_name', sa.types.Unicode(255), nullable=False)
)

And I have to create that table at different than public schema.
If I do people_table.tometadata(meta.metadata,
schema='myschema').create() sqlalchemy create table but with street_id
= ForeignKey('streets.id') not ForeignKey('myschema.streets.id')
How to make FK's follow new table schema or how to change foreign key
target on the fly?
With people_table.foreign_keys[0].target_fullname =
'myschema.streets.id' it doesn't work ? I get AttributeError: can't
change attribute

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to