https://meltano.com/ logo
#cli
Title
# cli
w

wide-salesclerk-68871

05/13/2021, 3:15 AM
Is there a way to roll downgrade the metadb? I’m planning to upgrade and I don’t see a way to invoke
alembic downgrade
in case I decide I need to revert meltano to a prior version and therefore need to revert the metadb too.
s

salmon-salesclerk-77709

05/13/2021, 1:45 PM
I don’t know the answer to this one! @ripe-musician-59933 or @salmon-actor-23953 might 🙂
r

ripe-musician-59933

05/13/2021, 2:11 PM
@wide-salesclerk-68871 There isn't a way to do that currently. All of the recent migrations have been additive only, though, so I'd expect an older Meltano to be able to handle a newer DB, although our auto-upgrade logic may stumble over that.
Can you try out what happens in a dummy project? And file an issue for any issues you encounter and the "downgrade" feature?
w

wide-salesclerk-68871

05/13/2021, 4:25 PM
👍
Yeah, it just throws an error on auto-upgrade about upgrading the db because it can’t find the “current revision”. Everything else seem to work fine. Could just roll back the alembic version in the db to get rid of the error. I’ll throw in an issue for the downgrade feature when I have a moment. If there are ever breaking changes and/or “non-additive migrations” it seems like having the ability to downgrade might be useful. I would guess that it wouldn’t be too hard to implement since the alembic migration scripts already have downgrade commands. Thanks!
r

ripe-musician-59933

05/13/2021, 4:42 PM
Yeah I agree, shouldn't be too hard
Thanks!