Red Gate forums :: View topic - Formatting changes not recognized
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 3
SQL Source Control 3 forum

Formatting changes not recognized

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
jed.sutton



Joined: 18 Apr 2013
Posts: 1

PostPosted: Thu Apr 18, 2013 4:55 pm    Post subject: Formatting changes not recognized Reply with quote

My project has instituted new SQL Style Guidelines. We use SQL Prompt to format the code per the process. Our process going forward when modifying DB objects is:

  1. Open DB object
  2. Reformat the object using SQL Prompt
  3. Commit to SVN using SQL Source Control to capture baseline for new format
  4. Make modifications
  5. Commit to SVN using SQL Source Control

The problem is that, in step 3, SQL Source Control doesn't recognize changes in format only. It can't simply be a whitespace issue because some keywords change case or things are rearranged on different lines. I can't find any settings to control this behavior.

Does anyone have any ideas?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Mon Apr 22, 2013 2:05 pm    Post subject: Reply with quote

Thanks for your post.

If the only differences are whitespace and/or casing, then SQL Source Control most likely won't pick this up. We only detect casing differences if the SQL Server is set to be case sensitive. Unfortunately there's no way to override this behaviour (but do please vote for the suggestion on our Uservoice page for SQL Source Control.

If you make some kind of syntactic change then we should pick up the difference; and I believe the fresh commit should then use the new formatting.
Back to top
View user's profile Send private message
freecell1



Joined: 13 Mar 2012
Posts: 20

PostPosted: Wed May 08, 2013 3:45 pm    Post subject: Reply with quote

We are having a similar problem with case and our SQL Server is indeed set to case insensitive collation (SQL_Latin1_General_CP1_CI_AS).

This is the SQL Server default. You can check it by:

SELECT name, collation_name
FROM sys.databases
WHERE name = 'mydatabase'

It would be nice if there were a workaround. We recently had an effort where we changed the strings on our client's site to be mixed case (they are stored in the db). We have spent a number of days trying to deal with the inability to actually cause changes to be rolled out to other machines via SSC.

The funny thing is that in the script files in subversion, the casing is correct. That is, I can change the case locally and also another field like a datestamp and SSC will take the commit. However when another developer gets latest, it gives them the updated date but not the updated string.

There must be a fix for this ... it's also confusing because the comparison pane on the commit changes screen shows the strings as different (i.e. it's showing a case sensitive comparison).

Is it a bug perhaps?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group