I have an MVC website that is connected to an azure web app and has continuous deployment to a staging site set up. It works great! After I check in, the successful build is automatically deployed to the staging slot of my webapp. After I verify that staging looks good, I can swap the two slots to make prod into stage and vice versa.
Recently I decided that I wanted the production and staging slots to connect to distinct databases so that I can enter test data into the staging site without cluttering the prod database.
I naively though I could do this by editing the connection strings in the configuration for the staging site to point to a new database. It seemed to work, but the next time I swapped configurations after a deploy, I realized that the connection strings get swapped in the process. This is not what I was aiming for.
Does anyone know how I can have the two deployment slots point to different databases and to maintain those connections after the swap? Is there another way I should be thinking of this?