Alembic not loading config member #854
Unanswered
MarcoRocco
asked this question in
Usage Questions
Replies: 1 comment 4 replies
-
this seems like an environmental problem of some kind. when env.py is loaded, "from alembic import context" will give you the real context object. questions:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're working on a project which uses Postgresql as a data source which is then managed/initiated using SqlAlchemy to create models, and Alembic for migrations.
The issue is that Alembic cannot auto-generate any new migrations, nor can it upgrade the database to the latest iteration when using the Alembic command. When done programmatically the database version upgrades fine, but we're unable to generate new revisions. There are multiple errors that can show up depending on minor changes in alembics
env.py
script but essentially hey come down to issues withcontext
s config member.Here is the folder structure:
here are the relevant information from
alembic.ini
(everything else is default)and here is env.py:
this is the error I receive when running something like
alembic revision -m "Add maintenances" --autogenerate
from the same directory where 'alembic.ini' is locatederror:
Beta Was this translation helpful? Give feedback.
All reactions