Allow SQL Compare to ignore name differences in Default Constraints
Since default constraint names are system generated, they may have the same defintion but a different name.
The ‘Ignore System named constraint and index names’ option should address this issue, unless I’ve misunderstood?
-
Gerald Britton commented
That option should address the issue, but it doesn't work for me
I ticked the box "Ignore constraint and index names", did a compare, then generated the script to apply the changes. The script however, contained statements to drop and recreate constraints where the only change was the name.
I need this to work since I want to separate the constraint and index renames into a separate script. The idea is to apply everything *else* then re-compare with the "ignore" option disabled to get a script that only contains constraint and index renames.
-
Alex Fekken commented
Ignoring "Constraint and Index names" works for me. You should probably clarify if you want this to be split into separate options.
-
John McLusky commented
Not all default constraint names are system-generated of course but where they do they essentially have the same definition (in the sense that the SQL used to create them was the same).
This of course also applies to other auto-named objects e.g. primary keys, unique constraints, foreign keys, check constraints... The key is the is_system_named column in the relevant system tables.
I'm sure that I asked for this about 4 years ago ;-)