I have generated some SQL Server(2008) upgrade scripts using SqlCompare. The primary objective is to add a null column. However, the generated script wants to drop foreign keys in a couple of other tables and the primary key of the target table before the add column. It then re-adds them. Is this necessary? What is the reasoning behind doing it?.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
No it is not necessary. See this working example below:
As you can see by the code, I modify
As to why your third party software does this, we could guess all day. But most likely they do it to handle some corner case without first testing whether or not the current operation falls into that.