Skip to content

Alembic Config does work properly with sqlalchemy.URL #1490

Answered by zzzeek
aqeelat asked this question in Usage Questions
Discussion options

You must be logged in to vote

Our current workaround is by not passing sqlalchemy.url to alembic.Config at all.

there is no need to pass the URL to the config. once you're in the env.py, use the programmatically generated URL directly and your code is correct (with the possible exception that you likely should use create_engine directly, rather than engine_from_config which appears unnecessary). This is how alembic's own recipes propose working with various ways of constructing connections.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aqeelat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
Converted from issue

This discussion was converted from issue #1489 on June 06, 2024 15:08.