Files
DP44/DataPRO/Modules/Database/DatabaseMigrationScripts/.svn/pristine/0d/0d5e1d71c24bbf900c68a96128dcedc20caa1a65.svn-base
2026-04-17 14:55:32 -04:00

17 lines
892 B
Plaintext

--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