Ability to exclude static table columns when deploying static data
Currently I have option to include or exclude data compare using -IgnoreStaticData switch (New-DatabaseRelease cmdlet).
But since part of my static data tables columns are environment based (in each environment dev/qa/prod I got different url)
I have to exclude columns.
Via Data Compare commad line I am using /Project switch which contains the exclude columns definitions.
(Another method that exists is IncludeColumns and /ExcludeColumns switches)
I need this options in order to start using SQL Release, otherwise static data deployment will make undesired changes.
We have a couple of options for this which may help some folks who have voted or commented.
For SQL Change Automation projects, the SSMS plugin now allows users to select only specific columns to add to the project for static data tables.
For both SQL Change Automation projects and for SQL Source Control projects, you also have the option to use a post-deployment script to dynamically control how static data is deployed to a given environment.
An example post-deployment script for this is here: https://documentation.red-gate.com/soc7/common-tasks/working-with-pre-post-deployment-scripts/static-data
Chris Michael commented
I have a similar requirement here also. Differing rowguid columns (used in replication) and lastupdated columns (updated by triggers for auditing purposes) cause static data to be pushed to the target when none of the actual data has changed.
I've a similar need that would fall within this suggestion. I would like the ability to have Data Compare not include Timestamp columns.