Re: [sqlalchemy] ForeignKey on a column referencing schema in another metadata object

2018-04-16 Thread Ashu Goel
ote that you can have the FOREIGN KEY in your database and not > > have the ForeignKey object in Python. In your alembic migration you > > can use ForeignKey within op.create_table() and that part will > > actually work, because it works around there being no other table > &g

Re: [sqlalchemy] ForeignKey on a column referencing schema in another metadata object

2018-04-13 Thread Ashu Goel
with doing #1 or #2 but just wanted to make sure that was the only way. On Friday, April 13, 2018 at 2:51:14 PM UTC-7, Mike Bayer wrote: > > On Fri, Apr 13, 2018 at 5:11 PM, Ashu Goel <soxf...@gmail.com > > wrote: > > Hey there, > > > > I am trying to setup a

[sqlalchemy] ForeignKey on a column referencing schema in another metadata object

2018-04-13 Thread Ashu Goel
Hey there, I am trying to setup a multi-schema database, where each schema has it's own metadata and tables, but ForeignKey constraints are allowed to cross schemas. This usually works fine until I start introducing something like alembic revision autogeneration, which uses the sorted_tables