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

Command to create a raw alembic_version table #964

Closed
kasium opened this issue Nov 10, 2021 Discussed in #962 · 1 comment
Closed

Command to create a raw alembic_version table #964

kasium opened this issue Nov 10, 2021 Discussed in #962 · 1 comment
Labels
command interface use case not quite a feature and not quite a bug, something we just didn't think of versioning model

Comments

@kasium
Copy link
Contributor

kasium commented Nov 10, 2021

Discussed in #962

Originally posted by kasium November 10, 2021
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

@zzzeek zzzeek added command interface use case not quite a feature and not quite a bug, something we just didn't think of versioning model labels Nov 10, 2021
@sqla-tester
Copy link
Collaborator

Kai Mueller has proposed a fix for this issue in the main branch:

Add new ensure_version command https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/3302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command interface use case not quite a feature and not quite a bug, something we just didn't think of versioning model
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants