Different Postgres schemes with different models in Python alembic #1294
Unanswered
maguirreluco-btf
asked this question in
Usage Questions
Replies: 1 comment 2 replies
-
yes, when SQLAlchemy models are defined they can be given explicit schema names on a per-table basis as described at https://docs.sqlalchemy.org/en/20/orm/declarative_tables.html#explicit-schema-name-with-declarative-table . The alembic migrations themselves would also include explicit schema name arguments within each so if the situation you have is no more complicated than that, it's just a matter of schema-qualifiying your models and migrations. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am new to using SQLAlchemy and Alembic and I’m trying to work with different models and schemas in a Postgres database. These schemas represent different system domains and the idea is to unify database models and migrations into a single project. My question is whether it is possible to keep migrations from the database with a single instance of alembic? I would appreciate some approach or suggestion on how to implement this.
Beta Was this translation helpful? Give feedback.
All reactions