Reputation: 20387
I just made a number of case only changes (just column names) to a DB under source control and noticed Red Gate SQL Source Control didn't pick them up (no changes to commit).
Will the tool natively identify changes in case? Is it dependent on the collation of the DB? These names are persisting through to an ORM so the case becomes pretty important at compile time.
Update
Just to give a use case scenario, I had a DB under SQL Source Control running under SQL_Latin1_General_CP1_CI_AS collation which is case insensitive, and that's just fine for the DB. I then have a web app using LINQ to SQL classes persisted from the database.
I then decided to change "ID" to "Id" to keep FxCop happy. I've changed it in the database, regenerated the classes and changed any references in the web app. Because I can't get this change under source control, if someone else pulls the database from VCS and regenerates the LINQ to SQL classes, every reference to "Id" is going to break on the .NET side.
Upvotes: 2
Views: 1117
Reputation: 20387
After spending more time looking at this issue in depth, having Chris from Red Gate unsure of a resolution and not getting any other feedback from this post or the equivalent one in the Red Gate forums, I'm calling this one a bug. I'd love to be proven wrong, but that seems to be the case (sorry about the pun!).
So to specifically answer my question, no, it appears SQL Source Control can't natively version a case-only change. However, there is a workaround involving making the change in the working directory and submitting this back via TortoiseSVN (assuming the VCS is SVN). Th full details are now in Defeating Red Gate’s SQL Source Control insensitivity.
Upvotes: 1