Re: Migrate alembic_version table from Public to tenant schema

2020-02-18 Thread Brian Hill
That works. I check if the version table exists in the schema and set version_table_schema if it does. Then after run_migrations if the version table didn't exist in the schema I move it to the schema. Thanks! Brian On Tuesday, February 18, 2020 at 1:30:54 PM UTC-5, Mike Bayer wrote: > > > >

Re: Migrate alembic_version table from Public to tenant schema

2020-02-18 Thread Mike Bayer
On Tue, Feb 18, 2020, at 1:17 PM, Brian Hill wrote: > Is there a way to move the alembic_version table in the Public schema > (postgres) to a specific schema (mult-tenant) as part of a migration? I highly doubt this is possible in the general case without the raw SQL in your env.py, because

Migrate alembic_version table from Public to tenant schema

2020-02-18 Thread Brian Hill
Is there a way to move the alembic_version table in the Public schema (postgres) to a specific schema (mult-tenant) as part of a migration? I want alembic to read the inital version from Public.alembic_version and then write the new upgraded version to the specific schema.alembic_version. The