Question

I want to add Build and Release pipelines in Azure Devops for my .Net Core application. Application uses EF Core migrations.

I used the solution provided for example here: https://blog.clear-measure.com/2019/01/07/run-ef-core-migrations-in-azure-devops/

It works fine. I generate script during build, publish it as another artifact and then use it to run against database during release step.

But how to deal with a situation that I want to revert the changes. Here I see two scenerios:

  1. It would be great if somehow I could just click Deploy on the previous release and this way get back to the previous working version of the app (and revert the DB as well).

  2. Revert the changes in the repo, deleting migrations that might have been created between releases and start build and deploy process again. How to revert already added migration to the DB?

Is even the first approach possible ?

Thanks for you help!

1
3
1/13/2020 12:18:36 AM

Popular Answer

First scenario is possible.

In your release pipeline, you can find the retained historical releases. enter image description here

Select the previous release you want to revert back to, click redeploy and it will roll back to the previous version.enter image description here

0
8/28/2019 7:45:25 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow