Files
DP44/DataPRO/Modules/Database/DatabaseMigrationScripts/MigrationScripts/Version95/Set_DefaultUseAdvancedUDPStreamProfilesToTrue.sql
2026-04-17 14:55:32 -04:00

17 lines
892 B
SQL

--If any StreamOutput sensor already has an advanced Stream Profile, add (if non-existent)
--or update, DefaultUseAdvancedUDPStreamProfiles = True, in the DefaultProperties table.
--This will cause it to be set to True in the UserProperties table automatically, later when needed.
IF ((SELECT COUNT(*) FROM SensorsStreamOutput WHERE StreamProfile <> 'CH10_ANALOG_2HDR' AND StreamProfile <> 'CH10_PCM_128BIT_2HDR') > 0)
BEGIN
--Add to or Update DefaultProperties table
IF ((SELECT COUNT(*) FROM DefaultProperties WHERE PropertyName = 'DefaultUseAdvancedUDPStreamProfiles') = 0)
BEGIN
--Add to table
INSERT INTO DefaultProperties VALUES (492, 'DefaultUseAdvancedUDPStreamProfiles', 'True');
END
ELSE
BEGIN
--Update existing entry
UPDATE DefaultProperties SET DefaultValue = 'True' WHERE PropertyName = 'DefaultUseAdvancedUDPStreamProfiles';
END
END