Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-18 Thread Nick Retallack
Here is the finished product: https://gist.github.com/nickretallack/bb8ca0e37829b4722dd1 It still requires me to edit the schemas out of the migrations after the fact, but at least the interesting work is all handled by alembic. -- You received this message because you are subscribed to the Go

Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-18 Thread Nick Retallack
Ok, I combined the two methods and the diffs look good, despite the explicit schema setting in them. If I delete the explicit schema settings and set search_path, it modifies the correct schema. Pretty cool. -- You received this message because you are subscribed to the Google Groups "sqlalc

Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-18 Thread Nick Retallack
I suppose one quick solution would be to do a find-and-replace on each migration script after it's generated... -- You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-18 Thread Nick Retallack
Ok, I'm trying that now. The result is that it tries to delete all of the tables out of "prototype" and create them all again with no specific schema set. Creating them without a specific schema is what I want, but this patch is useless if it just deletes and creates everything. I think I need m

Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-17 Thread Nick Retallack
On Monday, November 17, 2014 6:55:49 PM UTC-8, Michael Bayer wrote: > > for what specifically? Autogenerate will work with whatever data you > give it. Send in a target_metadata with what you want to view on the > Python side and tailor an include_object() function if you need in order to > f

Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-17 Thread Nick Retallack
If alembic didn't track schemas at all, it would probably do exactly what I want, which is: Set the search path If a table is visible, and the metadata doesn't set a specific schema for it, assume it's in the right schema. If a schema is explicitly specified in the table, use that schema when c

Re: Updating multiple Postgres schema objects from single SQL Alchemy model

2014-11-17 Thread Nick Retallack
I am doing exactly the same thing in my application. Is there a way I can get alembic to generate migrations for this? -- You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group. To unsubscribe from this group and stop receiving emails from it, send