ALTER TABLE [ASM_IVNT_DeviceDesiredState] DROP CONSTRAINT [FK_ASM_IVNT_DeviceDesiredState_Device];
GO

ALTER TABLE [ASM_IVNT_DeviceDesiredState] ADD CONSTRAINT [FK_ASM_IVNT_DeviceDesiredState_Device_Cascade_Delete] FOREIGN KEY ([DeviceID]) REFERENCES [Device]([DeviceID]) ON DELETE CASCADE ON UPDATE CASCADE;
GO

UPDATE [ManagedElementAttributeType] 
SET [IsMonitored] = 1 
WHERE [ManagedElementTypeGuid] = N'c039c4f8-c292-4a8b-8738-ae8043209985'
GO

UPDATE [AvastAgentAlertEventType]
SET   [time_window] = 10080 
WHERE [event_type_id] = 2
GO