Foreign Keys scripted in different order each time table is edited
I've found that frequently when I change something about a table (add a column for example), then when I do a diff of that table from SQL Source Control before checking in, the diff shows that the order of the Foreign Keys has changed. For example, it might list FK1, the FK2, and then FK3 on the left side of the diff, and FK2, FK3, and then FK1 on the right side of the diff. The definitions of the foreign keys have not changed, just the order in which they're scripted. So, this is not a critical issue, but it makes it seem that more has changed than actually has. Perhaps SQL Source Control could sort them or something so that they were always in the same order?
-
Paul Harvey commented
This is not the only place where diffs are affected by random sort orders. I'm sure I've seen this elsewhere too.