Skip to content
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

Properly set script_location for alembic #305

Open
nstoik opened this issue Jan 9, 2024 · 0 comments
Open

Properly set script_location for alembic #305

nstoik opened this issue Jan 9, 2024 · 0 comments

Comments

@nstoik
Copy link
Owner

nstoik commented Jan 9, 2024

https://github.com/nstoik/farm_device/blob/e3e520e99d3a8db34eb6f5920df2dcd780c3d817/device/migrations/alembic.ini#L5C26-L5C26

When trying to downgrade an alembic version inside a docker container (docker exec -it, for troubleshooting), this command:

(device) fd@e321a9d9480a:/workspaces/device$ alembic -c /workspaces/device/migrations/alembic.ini history

was giving the following error:

  FAILED: Path doesn't exist: '/workspaces/device/alembic'.  Please use the 'init' command to create a new scripts folder.

This indicates that the script_location setting is incorrect. It should possibly be migrations instead of alembic.

Also should add a command to downgrade via the cli. Either -1 or a specific revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant