Skip to content

Settings and activity

1 result found

  1. 636 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    under review  ·  Kendra responded

    Hi everyone. I have merged some User Voice items on this topic of “filtered” static data, as there was significant overlap. I want to share our current guidance on handling scenarios where you need to version a subset of the columns and/or rows in the table.

    With SQL Source control, the best option at this point is to use a post-deployment script for this purpose.

    SQL Source Control introduced pre- and post- scripts in v6.3.

    A post-deployment script gives you a good amount of flexibility over exactly which rows or columns of data you want to include in your project. Example post-deployment scripts for static data are here: https://documentation.red-gate.com/soc7/common-tasks/working-with-pre-post-deployment-scripts/static-data

    If you make heavy use of Static Data, we have stronger support for this in SQL Change Automation.

    SQL Change Automation:

    • Supports column filtered static data tables in the SCA plugin in SSMS
    • Supports multiple post-deployment scripts, in case there is…
    An error occurred while saving the comment
    Timothy Bussmann commented  · 

    We have a scenario where we have table maintenance screens in a user interface to allow the user to add/modify/delete lookup type values. As part of our application we provide a number of lookup values that are system defined and cannot be modified. We would like to be able to source control the system defined values, but also allow for user defined values to be unaffected. It does not make sense for us to use a separate table for the user defined lookup values because that would complicate the data schema and application design. It would help us a lot if we were able to source control static data that is filtered by a where clause (e.g. IsSystemDefined = 1 in our case).

    Timothy Bussmann supported this idea  ·