Migrations Rollback #1339
Replies: 56 comments 70 replies
-
I would love a migrate down option as well. My current approach is:
|
Beta Was this translation helpful? Give feedback.
-
If implementing an automated rollback script will take a big effort, I'd like to have a way to opt in for a manual rollback script for the time waiting for the feature. Being able to review and commit a rollback script like |
Beta Was this translation helpful? Give feedback.
-
I second that - not implementing migrations rollback/resetting is a huge omission. It's an awful pain to correct your migrations when developing schema change in a single PR doing changes on the way, since you have to delete or merge the migration files, modify the journal, revert the DB state manually and whatnot. |
Beta Was this translation helpful? Give feedback.
-
Can I pay Drizzle Team to add this? |
Beta Was this translation helpful? Give feedback.
-
Please add a rollback option for migrations :) would be awesome. |
Beta Was this translation helpful? Give feedback.
-
Don't have it yet? Wow... it's so essential! |
Beta Was this translation helpful? Give feedback.
-
agree |
Beta Was this translation helpful? Give feedback.
-
Yeah this would be huge |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Needing this feature so badly |
Beta Was this translation helpful? Give feedback.
-
Hope it releases soon |
Beta Was this translation helpful? Give feedback.
-
Just need this feature to use in production :( |
Beta Was this translation helpful? Give feedback.
-
Can we get any update on this from the drizzle team? I've posted the same in Discord, but haven't received a response. Be good to know if this is being worked on or not. Not, is fine, we'd just need to work on some approach that builds the reverse migrations using something else, but I'd be keen to know if it's something in the pipeline just to avoid recreating the wheel here. Please and thanks 🙏 |
Beta Was this translation helpful? Give feedback.
-
+1 on this, this is the only thing preventing us from using Drizzle for production as migration rollback can be crucial when deploying. |
Beta Was this translation helpful? Give feedback.
-
rollback pleaseeeee... |
Beta Was this translation helpful? Give feedback.
-
I really love drizzle but please any update on this? |
Beta Was this translation helpful? Give feedback.
-
Nudge from me too please - seems writing equivalent down commands on every migrate should be simple enough. |
Beta Was this translation helpful? Give feedback.
-
👍 for the need |
Beta Was this translation helpful? Give feedback.
-
+1 for us too. It's a non-starter without rollbacks. |
Beta Was this translation helpful? Give feedback.
-
Any updates @AlexBlokh? |
Beta Was this translation helpful? Give feedback.
-
Any good news about this one? |
Beta Was this translation helpful? Give feedback.
-
Hey folks! Since 62+ people are getting notified every time someone says that they'd love to have this feature |
Beta Was this translation helpful? Give feedback.
-
Any updates guys? 👉👈 |
Beta Was this translation helpful? Give feedback.
-
Absolutely love drizzle, but my team won't adopt it prod without this feature 🙏 |
Beta Was this translation helpful? Give feedback.
-
I'll pay for this feature |
Beta Was this translation helpful? Give feedback.
-
Please, this is a fundamental part of any migration solution. Not having the possibility to rollback, creates a massive headache if one person messes up one migration for whatever reason. |
Beta Was this translation helpful? Give feedback.
-
It's been two years, why there is no response to this most asked feature? And also curious to know that how people are managing rollback today? |
Beta Was this translation helpful? Give feedback.
-
The strategy that feels like the best path forward would be a phased approach i would think
|
Beta Was this translation helpful? Give feedback.
-
Something really cool is coming |
Beta Was this translation helpful? Give feedback.
-
I have read this blog and looks promising, Anyone has tried this manual approach? https://app.studyraid.com/en/read/11288/352162/running-and-reverting-migrations |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi #drizzle-team & community folks 👋
I'd like to suggest something that I believe more people might be looking for. Is there any plan for rollback migrations?
My day-to-day workflow
Because Drizzle currently doesn't support a way to rollback migrations I'm using a custom solution (hopefully temporary) with migrate with a specific
Dockerfile
configured and a more painful way to configure/deploy to run our migrations, which might be slightly painful sometimes:*.up.sql
the migration script;*.down.sql
and manually add a rollback;Dockerfile
+run.sh
script that doesn't look as pretty as I would like; 😅I was wondering if on next releases, there will be any sort migration rollback like migrate does.
This would benefit many developers and wouldn't be a breaking change by keeping everything else working.
Possible solution:
drizzle-kit generate
command;*.down.sql
;drizzle-kit
it cheks for the migrations table and identifying the latest migration ID to match with a<migration_name>.down.sql
script on the folder to be executed otherwise exit;drizzle-kit rollback:*
/drizzle-kit undo:*
command;The future
Using Drizzle is being a breazy so far (coming from Knex) and I wanna see what things going far beyond the rest of the community.
Let's see how the community will (or not) react to this idea (calling for help) and also the core team.
Beta Was this translation helpful? Give feedback.
All reactions