What are the challenges you face when working across database platforms? Take the survey

Deploy-Changes reference script executing without any changes to it

Hi all!

We are currently using SQL Change Automation to deploy database changes to our environments. We have reference scripts under the Deploy-Changes folder which we use to insert reference data to our database.

Here's a sample script:
DECLARE @ReferenceTables Utility.ListOfTables
DECLARE @AlternateComparisonColumns Utility.ListOfTablesAndColumns
DECLARE @Administration_UserActivityLogTypes_DATA UserActivityLogTypesTableType
INSERT INTO @ReferenceTables VALUES ('Administration','UserActivityLogTypes')

INSERT @Administration_UserActivityLogTypes_DATA ([ID], [ActivityType])
    VALUES(317, 'DIY Project - Report Access Updated from E4')
INSERT @Administration_UserActivityLogTypes_DATA ([ID], [ActivityType])
    VALUES(318, 'DIY Project - Report Access Published to E4')

DECLARE @SQL nvarchar(MAX) =''
SET @SQL += Utility.GenerateReferenceDataMergeById(@ReferenceTables,@AlternateComparisonColumns)

EXECUTE sp_executesql @SQL
, N'@Administration_UserActivityLogTypes_DATA UserActivityLogTypesTableType readonly'

These reference scripts should only run when there are changes to the file but for some unknown reason, some executes even if there are no changes to the file which causes data issues in production. Is there a known issue/bug in SCA that is similar to this?

Sign In or Register to comment.