Skip to content
Discussion options

You must be logged in to vote

you can look for alembic version table in env.py using inspect(connection).has_table("alembic_version"). for stamp you'd need to check if some version that you expect is in the table, we dont exactly have an "is_version_applied" method, you'd need to look at what version is present and then walk the revision tree to see if it's a descendant of the version you expect, if that's what you really want here. look in the source for the ";history" command to see how to get this data

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@zzzeek
Comment options

@CaselIT
Comment options

@zzzeek
Comment options

@jvanasco
Comment options

Comment options

You must be logged in to vote
2 replies
@jvanasco
Comment options

@jvanasco
Comment options

Answer selected by jvanasco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants