When versioning static data, is there a way to ignore differences in a column in SQL Source Control

We would like to version data in a table, however there are specific columns that need to be ignored. Data Compare has the feature to filter (ignore) specific columns. How do we achieve this in SQL Source Control? Thanks in advance!

Answers

  • AlexYatesAlexYates Posts: 264 Rose Gold 2
    I'm trying to think of a good way to do this but can't think of anything better than move the static data and "not static data" into different tables.

    Is there any reason why you can't do that? (Other than the fact that this sounds like a complicated data migration).
    Alex Yates
    DevOps Mentor and Coach

    Director of DLM Consultants
    Creator of Speaking Mentors
    Microsoft Data Platform MVP
    Friend of Redgate
    Twitter / LinkedIn
  • morganmorgan Posts: 3 New member
    AlexYates wrote: »
    I'm trying to think of a good way to do this but can't think of anything better than move the static data and "not static data" into different tables.

    Is there any reason why you can't do that? (Other than the fact that this sounds like a complicated data migration).

    I guess a better term for the data is "lookup data". It rarely changes, but when it does we don't want Redgate to overwrite the changes in that column. We want all environments to get the rows with the default values if they are missing, yet still have the possibility of one column being modified in specific scenarios. The tables are properly normalized, so there is no need to break the data up into different tables. Also, if we were to break it up as you suggest, that would still leave us manually managing data in the "not static data" table. So it wouldn't be an improvement.

    It appears that its the SQL comparison tools that are operating underneath, and the filters work fine for object structure. So why leave out the data filters?
  • morganmorgan Posts: 3 New member
    AlexYates wrote: »

    Thanks for the link! I added votes. Too bad it hasn't been added in this many years!
  • Is it possible to source control a view? If so, a view could be created that excludes the column. Just a thought (I haven't tried this myself - just thinking aloud).
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.