With the new Azure Website Deployment Slots feature, “Slot Settings,” we can “snap” the connection string and application settings to a specific slot. I installed two slots: production and production, and checked that I can exchange them with each other and point to the correct database. The database is updated automatically using the first code migrations. However, I'm not sure exactly how the “rollback” (or should) work with the database in this scenario.
For example, consider the following:
- Application v1 is in the production phase and points to stage Db v1
- Application v1 works in production and indicates the production of Db v1
- Application v2 is deployed for an intermediate installation, and updates of the first stage of the code with an intermediate location of Db to Db v2
- intermediate and production slots are replaced.
- App v2 works in production, and the db version is updated to the version of Db v2.
- Application v1 works in the setting phase, but pointed to the db stage, which is still Db v2
Is there a way to move the staging database back to v1? If there was an “emergency” and I had to change the order and production again and again, is it possible to return the production database to v1? I understand that this can be done using Update-Database, but it is unclear how to configure it as automated as possible on Azure websites.
source share