Rules to Better SQL Server Schema Deployment - 13 Rules
The deployment of your schema is critical to your application. You should never get an error message reported from a user like:
"When I click the Save button on the product form it gives an ❌ error message about a missing field."
Bottom line is the customers' database schema should always be correct, should be managed automatically by the app and if it is not, you’re doing things wrong.
Use our great modern tools properly, and a schema problem will never bite you.

You have worked hard on the coding, got a "Test Pass" from the testers. Great! Now you have approval to deploy to production. Let's see some ways that allow for easy deployments.
Modern Projects
If you are using Entity Framework Code First migrations this can be handled within your pipeline.
Legacy Projects
With Visual Studio, deployment becomes easier and easier, you can choose different ways for different kinds of projects.
Web Clients
- Right-click "Publish" (recommended if you can directly connect)
OR - Right-click "Create Package"
Figure: For a web app it is just one click Rich Clients
- Right-click "Publish" (recommended if you can use ClickOnce)
OR - Right-click "Create Setup" (Suggestion to Microsoft as menu doesn't exist)
Figure: For a Windows clients it is also just one click Database
Figure: For the Database it is... well one click is what you need to aim for Now all this works beautifully first time, when there is no existing database... and no existing data to worry about. Now you have a reason to read the rest of the rules :-)
- Right-click "Publish" (recommended if you can directly connect)
In the fast-evolving world of software development, it's crucial for your database deployment process to be as efficient and reliable as your application updates. With the advent of .NET 8, there are several modern tools and methods that can help you achieve this seamlessly.
✅ Recommended Tools for Database Schema Updates
- Entity Framework Core Migrations: EF Core Migrations has become the de facto standard for managing database schema changes. It offers robust, integrated support for versioning and deploying database changes, making it the preferred choice for both new and existing projects.
- DAC Support For SQL Server Objects and Versions (.dacpac files): Still relevant for SQL Server database management, particularly in complex deployment scenarios.