Replies: 1 comment 2 replies
-
|
We might accept such a flag as long as the documentation makes it clear that it really depends on how your migrations are written if this works or not. For the general case I would expect that this will fail horribly as migrations may have dependencies on each other. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've finally got around to implementing a "true" rollback as part of our deployment process, and that requires a better solution for reverting migrations.
For this, I designed the following script to run in our CD pipeline:
This allows you to simply "git revert" unwanted migraitons, and for those migrations to be reverted as a result.
The new
diesel migration revert --alloption is almost enough to make this work. The problem is that it tries to revert all applied migrations, not just those present in the migrations folder.I'm proposing a new command line option for
diesel migration revert,--skip-missing. When used,diesel migration revertwill not stop if it can't find a migration, it will just continue on to the next. (It could still print out eg. number of migrations skipped).Given that I need this, I'll be implementing some solution regardless, but I wanted to find out:
a) if there's a better alternative
b) if it's worth trying to upstream
Beta Was this translation helpful? Give feedback.
All reactions