Skip to content

Relative path for script_location in alembic.ini #1628

Discussion options

You must be logged in to vote

However, I noticed that script was looking at the wrong place! My alembic.ini file contains

[alembic]
script_location = ./

It was looking into ./versions relative to the location where the Python script lives, not in the ./versions relative to where the alembic.ini file lives.

oh, I've never heard of systems assuming the absolute location of the ini file is where "." should be. as documented we support the %(here)s symbol, which is how this is set explicitly for .ini files:

[alembic]
script_location = %(here)s/

it's not a dot but that will give you the absolute path of where your .ini file is.

Replies: 1 comment 1 reply

Comment options

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

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