Alembic dry run command #936
Unanswered
carolguo-dd
asked this question in
Usage Questions
Replies: 1 comment
-
you need to get the database's current version using "alembic current", then specify that in --sql, "alembic upgrade --sql <current_rev>:head". --sql mode is intended to be useful when you dont have a database at all, so the two steps are separate. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the use case
Is there a command that could print the the the raw sql command for any given command?
I find
--sql
not exactly the dry run command.For example
alembic upgrade head --sql
prints out all the migration up to head, but it doesn't consider the current state of the databases. So the statements executed byalembic upgrade head
isn't always the same as the output ofalembic upgrade head --sql
Databases / Backends / Drivers targeted
Example Use
Additional context
Have a nice day!
Beta Was this translation helpful? Give feedback.
All reactions