Replies: 2 comments 6 replies
-
it's a common use case, and you're actually doing it the "right" way which means you are doing the locking to make it happen. you are on the right track with alembic stamp, just call it with "alembic stamp base", that by defintion ensures the version table is present but wont put anything into it. |
Beta Was this translation helpful? Give feedback.
1 reply
-
ok we need a command "ensure_version". I can accept PRs that have tests for this, see the tests in tests/test_command.py for other examples. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
not sure if this use case is somehow common, but I would like to request it:
In my application, I use the alembic_version table as a synchronization point, meaning that multiple instances of the app are starting in parallel and will try to lock the alembic_version table in order to execute a migration. However, this approach only works if the alembic_version table already exists.
So, my question would be, if it would be possible to a command to generate a raw alembic_version table? It would help me a lot. Currently I use heads and stamp together, but the code doesn't make it obvious want I want to do
Beta Was this translation helpful? Give feedback.
All reactions