Do you know why you shouldn't compare schemas during deployment?

Last updated by Jack Pettit [SSW] almost 2 years ago.See history

SQL Compare is a good tool to find out the differences between two databases. It can help you answer the question "Is your database the same as mine?".

However, if you are doing this at the end of your release cycle, you have a problem. Your schema deployment process is broken...

What you should be doing is seeing your Schema Master each time you have a new .sql file. You do this during the development process, not at the end in the package and deployment process.

Tip: If you are using modern methods such as Entity Framework code first migrations you will already be doing most of this.

Tools like Red Gates SQL Compare and Microsoft's Schema Compare (aka Data Dude) will compare schemas really well but aren't useful when you are deploying as it won't be repeatable.

red gate sql compare
Figure: Using Red Gates SQL Compare

microsoft schema compare
Figure: Using Visual Studio SQL Schema Compare

We open source. Powered by GitHub