Ignore collation, PK name, FK name
During the script compare, it would be nice to be able to ignore collation, PK names, FK names, etc...
I have the same table on two servers, PK for the table is call PK_OrderDetails_76E0ADF on the other its called PK_OrderDetails_AC45C0F.
Given that its a rather hefty clustered index, I don't particularly want to recreate it just to have the name in sync.
SQL Source Control v18.104.22.168 has been released and allows you to configure comparison options – including ‘Ignore Collation’ and ‘Ignore constraint and index names’. To get this version, please run Check For Updates from the Help menu in SQL Source Control.
Comparison options can now be set via a configuration file in your database repository’s Working Base folder. The following article describes how to do this: http://www.red-gate.com/SupportCenter/GeneralContent/knowledgebase/SQL_Source_Control/KB201202000521
Our plan in the future is to provide an options dialog to allow users to configure the comparison options that are changed most often, but we believe this configuration file procedure should help users in the interim.
If you’d like to see an options dialog exposing these settings in SQL Source Control, please vote on the following idea – https://redgate.uservoice.com/admin/forums/39019-sql-source-control/suggestions/2615460-add-an-options-dialog-to-allow-configuration-of-co – and let us know which options you’d like to see exposed in the dialog.
While I'm grateful for the IgnoreConstraintNames option, the IgnoreKeys option worries me a little. While the name of a key is irrelevant to me, the included columns and clustering are very important. If I turn IgnoreKeys off, my guess is that I'd lose that, right?
Being able to commit the scripts without any COLLATE statements would be a big step forward for us. We use an installer which builds from our repository scripts or we execute SQL from the repository via powershell. Having hard coded collation settings makes this more or less useless for us. We have to export the scripts after a commit, do a find replace on all the collations and then do a recommit.
Henrik Kjær Jørgensen commented
As it might not be the same people/organization installing the SQL server determining the default collation as the developers using Red Gate's SQL Source Control for their development tasks it would be a very good idea to make scripting independent of collation. Otherwise a very good tool!
Simon Foote commented
This would be invaluable to us, as we maintain multiple database version and in different collations.
We could really use this yesterday.
Great product already, this would make it fantastic!
Roy Goode commented
The company I work for has databases all over the world. We cannot use SQL Source Control because of the differing collations on the servers, such as Hebrew (CP1255) collation, that result in the software saying every table in the database has changes.
Roy Goode commented
The ability to ignore Collation is extremely important to our business. This is a must have.
Andrew Tregonning commented
We're very keen for an option to ignore collations.
David is referring to http://redgate.uservoice.com/forums/39019-sql-source-control/suggestions/466902-offer-customizable-options. Thanks!
David P. Murphy commented
This seems very similar to my earlier suggestion entitled "Offer customizable options".