Visual studio extension thinks a trigger has changed when it did not

Version: 3.0.19052.5318
Shows a table with pending changes. Change summary: Alter trigger. No changes have been made to this trigger. When I right click and view object differences there are no changes. Both files match. Using latest version of SQL compare against shadow DB it does not detect a change in the trigger either.

This showed up after I upgraded the extension.  Is this a bug? 
Tagged:

Best Answer

Answers

  • This isn't against the shadow database. The change is detected between the development database and the project. That's where things change. The Shadow is used to verify the script works after being imported and syncs shadow from the previous version of the project to the latest version.
  • MondayMonday Posts: 77 Silver 3
    That's a good point. I forgot that SQL Compare now allows comparison between DB and project. Regardless same results with SQL compare against the DEV DB and project and VS not showing any difference between the 2 files. Here is a screen shot of both SQL compare and the project in visual studio.
  • It's hard to know what is going on without the db and project (and vcs repo). SCA-VS uses SQL Compare to generate the differences for the Import pane.

    You shouldn't ever compare or change the Shadow db. That's for the tool to verify some script changes. You should only be detecting differences between your VCS repo/project and the development db. If there aren't any changes, can you repro this at all? Any ideas? Or can you zip up the repo and a backup of the db and post?
  • MondayMonday Posts: 77 Silver 3
    My hope with this forum post was to either 1. Find out this was already a known issue or 2. Find out if other users are seeing the issue after upgrading. I will open a support ticket and include my project.

    I would not normally compare in this way but I just need to trouble shoot why the VS extension thinks there is a change when there clearly is not when it is checked multiple ways all showing there is no change.  This seems like there is a bug , especially when it showed up right after I upgraded and there were no changes listed before.
  • MondayMonday Posts: 77 Silver 3
    I opened a support request. Request #132233. One more thing to note is that if I import and generate the pending changes for this trigger, it still shows up afterwards again and again as pending a change. It never goes away. 
  • Likely a bug then.
  • rconradrconrad Posts: 9 New member
    I'm running into the same issue except that every single stored procedure and view are flagged as changed when in reality none of them have changed (and neither has anything else).  If I "Import and Generate Script"  I get a new script with no sql commands.  The only thing in the script are commented lines regarding the symmetric key.
  • MondayMonday Posts: 77 Silver 3
    Here is an update from Redgate with the ticket I opened with support:

    This appears to happen due to whitespaces. The development team are currently investigating this (bug ref # SCA-2549)
    My response, I was able to get it working

    It is a bug with white space. I already have SyncOptionIgnoreWhiteSpace set to true in my project. I assume the bug is that the extension is not fully honoring that setting. I set SQL compare to not ignore white space and re compared my DEV and VS project. See screen shot.

    I fixed my issue by running the migration script the extension generated on my DEV DB. The bug in the extension still needs to be fixed though.

    There was a white space difference with CR/LF

  • rconradrconrad Posts: 9 New member
    Thanks for the heads up.  I'll try that.
Sign In or Register to comment.