Will SQL Source Control identify a case change?

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace

Will SQL Source Control identify a case change?

Postby troyhunt » Sun Nov 28, 2010 3:42 am

I just made a number of case only changes (just column names) to a DB under source control and noticed 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.
troyhunt
 
Posts: 15
Joined: Sun Nov 28, 2010 3:36 am
Location: Australia

Postby chriskelly » Mon Nov 29, 2010 5:17 pm

This behaviour could be caused by SQL Server itself if the database has been set with a case insensitive collation.

To look at whether this is the case, see this StackOverflow article:
http://stackoverflow.com/questions/1411 ... ensitivity

If it is the case then you will need to change you database to a Case Sensitive collation.
chriskelly
 
Posts: 330
Joined: Mon Apr 19, 2010 1:44 pm
Location: Cambridge, UK

Postby troyhunt » Wed Dec 01, 2010 11:20 am

After spending more time looking at this issue in depth, having Chris unsure of a resolution and not getting any other feedback from this post or the equivalent one on Stack Overflow - http://stackoverflow.com/questions/4302779/can-red-gate-sql-source-control-identify-a-case-change - 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" - http://www.troyhunt.com/2010/12/defeating-red-gates-sql-source-control.html
troyhunt
 
Posts: 15
Joined: Sun Nov 28, 2010 3:36 am
Location: Australia


Return to SQL Source Control 1

Who is online

Users browsing this forum: No registered users and 0 guests