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

Add --purge flag to the stamp command #540

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

hurtleturtle
Copy link
Contributor

When running migrations, I've occasionally encountered an issue where the database is at a revision that is no longer exists due to a change in the structure of the migrations. When this is the case, it would be useful to be able to purge the revision present in the alembic_version table and stamp the new revision ID that corresponds to the database's current state.

Alembic already contains this capability, so I've just added it into the flask-migrate stamp command.

@miguelgrinberg miguelgrinberg merged commit af67bb0 into miguelgrinberg:main Mar 9, 2024
21 checks passed
@miguelgrinberg
Copy link
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants