snippetsqlMinor
Deployment script always re-create constraints and indexes
Viewed 0 times
scriptconstraintscreatealwaysindexesanddeployment
Problem
When generating a deployment script from SSDT it always generates code that drops the foreign key constraints & indexes then creates again those constraints and indexes. How to remove the code that drops and recreates those objects when generating deployment script? Any options in SSDT?
Solution
It is normally because there is a difference between how they are written and how sql stores them.
As a one time thing to a compare back from the db to the project and you should see some difference on the keys, apply them and it should stop doing it.
As a one time thing to a compare back from the db to the project and you should see some difference on the keys, apply them and it should stop doing it.
Context
StackExchange Database Administrators Q#91644, answer score: 3
Revisions (0)
No revisions yet.