Open zorbathut opened 1 year ago
alembic upgrade <revision>
or alembic downgrade <revision>
with alembic current
for the current revision in a shell will work i think?
Yeah, the issue is:
On the other hand, maybe downgrades shouldn't be easy, I really don't want to accidentally do a major downgrade and blow away a ton of info.
related: #555
It's possible to use alembic in a python script (SO question). I see there is downgrade and upgrade in there.
Right now Alembic seems to just update to "the latest db version it's aware of". In an ideal world it would know what db version it's meant to be on, and then update to this. This is relevant if we need to downgrade; it would be nice to be able to just deploy a server with all the migrations available and tell it "go to this version (which is not the most recent)".