Skip to content

Alembic paths and environment organization #887

Discussion options

You must be logged in to vote

Thank you for taking the time to reply in detail. I think the key thing I failed to understand was that using %(here)s could save a lot of trouble dealing with relative path resolution happening in the CLI and our bootstrapper code. I didn't think to try that in the project organization that came before this one.

Using prepend_sys_path we were able to eliminate all the explicit path hacking, and using %(here)s/alembic we were able to move alembic.ini back into the module directory.

And this is an obsolete problem now, but when we only added the project root to sys.path in env.py (and not in the mako template and migrations), alembic current worked, but alembic history did not. The latter …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@zzzeek
Comment options

@willsthompson
Comment options

Comment options

You must be logged in to vote
3 replies
@zzzeek
Comment options

@willsthompson
Comment options

@zzzeek
Comment options

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