Skip to content

Custom Connection Creators #941

Discussion options

You must be logged in to vote

the create_engine logic is editable within your env.py file that's local to your environment, after running "alembic init". Go in there and set up the create_engine logic that you need.

in this case the code you would be augmenting is at:

connectable = engine_from_config(
config.get_section(config.config_ini_section),
prefix="sqlalchemy.",
poolclass=pool.NullPool,
)

that is the engine object. you'd replace this with your create_engine() code above.

https://alembic.sqlalchemy.org/en/latest/tutorial.html#the-migration-environment

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@luciengaitskell
Comment options

Answer selected by CaselIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants