Andy Watt
1 min readJun 25, 2021

--

I do agree that the down migrations are never used in production. I really just included them for completeness.

The use case that I had in mind when I wrote this post actually started with me trying to get the 'downs' to work (I gave up on that). The project I was on was using a CD pipeline through Azure Devops. We tried to undo a deployment, and realised that while we could 'one click' roll back the web app, the pipeline had no way to roll back changes to the database. Which seemed like a bit of a pity!

So this started out as a way of testing data consistency when going up and down, so that you can move around the previously deployed versions through devops.

I decided in the end that any automated way of rolling back data was pretty dangerous, and gave up on that. I was basically building in the option to automatically wipe out user data...

--

--

Andy Watt
Andy Watt

Written by Andy Watt

Technical Lead and co-founder at Avalone Consultants. Angular, .NET, and blockchain developer.

No responses yet