I'm just wondering if anyone has come across this issue before.
For simplicity we have 2 projects
- SSDT Project
- ASP.net MVC app
Both are hosted on AWS, the MVC app is load balanced with 50% instance deployments.
Deploying these apps via a CI server separately may cause a timing window that can cause the application to break if there are breaking schema changes in the SSDT deployment.
A new Not Null column gets added to a table, users are still using the old version of the web app and it may break because the table expects a value.
Or the reverse, the web app has updated but tries to insert data into that column but does not exist in the table yet.
One possible way to solve this is create the column as to allow nulls, deploy SSDT changes, deploy web app, alter column to not null in SSDT, redeploy SSDT. This process is a manual process unfortunately.