Multiple heads, downgrade single branch to branch point #1480
-
Working on two separate features concurrently, here's my migration tree:
After upgrading to Now, say I'd like to revert Downgrading to I've been reading https://alembic.sqlalchemy.org/en/latest/branches.html and #464. I didn't use branch labels but since branches can also be referred to by rev name, I tried to downgrade Is there something I'm misunderstanding? Is there any way to achieve what I'm trying to? If that matters, I'm using a custom command that calls the API as alembic.command.downgrade(config_path, "rev3@rev1") |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
the
|
Beta Was this translation helpful? Give feedback.
-
Oh, boy. Error on my side. My rev3 downgrade function was copied from the rev2 migration script and because I missed a few lines while find'n replacing, the downgrade function was basically the same as the rev2 one. It triggered the same FK error as when attempting the rev2 downgrade, so I assumed it was actually performing the rev2 downgrade as well. Thanks for confirming the method was correct and sorry about the noise. |
Beta Was this translation helpful? Give feedback.
the
rev3@rev1
approach works on this end, here's an example