Any way to get alembic check
to take pending migrations into account?
#1441
Unanswered
cjw296
asked this question in
Usage Questions
Replies: 2 comments 12 replies
-
Hi, there is the check command that should to what you are looking for https://alembic.sqlalchemy.org/en/latest/api/commands.html#alembic.command.check |
Beta Was this translation helpful? Give feedback.
1 reply
-
On 13/03/2024 10:17, Federico Caselli wrote:
Hi,
there is the check command that should to what you are looking for
https://alembic.sqlalchemy.org/en/latest/api/commands.html#alembic.command.check <https://alembic.sqlalchemy.org/en/latest/api/commands.html#alembic.command.check>
Almost, but not quite...
#1441
Chris
|
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking for an alembic equivalent of Django's
makemigrations --check
.Alembic's
check
command isn't quite this, it appears to be more like Django'smigrations --check
.The use case I have is to ensure that pull requests haven't changed database models in such a way that an alembic migration should have been included in the PR. What's working for folks in this area at the moment?
If I run
alembic check
with correctly generated and up-to-date migrations, I still get:I'm looking for something that I can run that will take into account the unapplied migrations and only fail if someone forgot to generate one.
Beta Was this translation helpful? Give feedback.
All reactions