-
-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear error messages from alembic when base cannot find 'migrations' directory. #663
Comments
Rowan Hart has proposed a fix for this issue in the master branch: Fixes #663. Clarified an error message on failure to find 'migrations' path. https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/1740 |
yeah "migrations" is not a "path" exactly is it |
It should be a path, I haven’t seen any options for the dir. argument to that function to be a URI or anything different |
there's a way it can be a setuptools resource path I think and also someone wants to make the whole thing work without filesystems at all but that's not happening right now. |
Ah gotcha, I hadn't noticed that. Making it all work with no fs sounds like quite an undertaking but also a pretty cool idea! |
Rowan Hart has proposed a fix for this issue in the master branch: Clarified an error message on failure to find 'migrations' path. https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/1740 |
thanks! |
What was the suggested solution? |
A clearer error message was added. You can refer to the linked commit |
I have a pull request ready to fix this.
It's a very simple issue, when I run some flask stuff from the wrong directory, calling upgrade() in flask_migrate tries to use alembic to obtain the 'migrations' directory. Unfortunately the error message when it cannot find 'migrate' is pretty unclear if it ends up printing a relative path (in my case the path was simply '.') you'll see an error message like:
alembic.util.exc.CommandError: Path doesn't exist: 'migrations'. Please use the 'init' command to create a new scripts folder.
The text was updated successfully, but these errors were encountered: