If you’re getting an error that reads something like “Msg 3728, Level 16, State 1, Line 1
‘DF__Dogs__DogId__6FE99F9F’ is not a constraint“, it’s probably because you’re trying to drop a constraint that isn’t in the database.
To fix this issue, check to make sure the constraint exists before dropping it. Alternatively, use the IF EXISTS
clause to drop the constraint only if it exists.