Alembic Autogenerate Error #1586
Unanswered
RicardoJDaleprane
asked this question in
Usage Questions
Replies: 1 comment
-
your config assuming it's copied from the recipe here: https://alembic.sqlalchemy.org/en/latest/cookbook.html#rudimental-schema-level-multi-tenancy-for-postgresql-mysql-other-databases is missing setting up the default_schema_name in your dialect that is otherwise cached: you otherwise want to look at your models and the tables that autogenerate is proposing to see if the "schema" attribute matches up. if they don't, then alembic is seeing things differently than your model does. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a problem similar to the following discussion https://github.com/sqlalchemy/alembic/discussions/1416.
PostgreSQL 12.20
Ubuntu 12.20-0ubuntu0.20.04.1
My model
env.py
The configuration is to use multi-tenant where common tables are configured for the shared schema and the exclusive tenant tables do not have a declared schema and the correct schema is dynamically informed during migration.
When Autogenerate is for adding columns to tenant tables to work correctly
How long does it take to include a column in the shared schema tables even if the tables already exist? The generated script creates all the tables again.
I have already tried configuring include_schemas and include_name without success.
I imagine that this behavior may be related to the schema declaration explicitly in the model since the error only occurs in these tables.
Beta Was this translation helpful? Give feedback.
All reactions