
--Migration_RCCP_20250424_135126.txt
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.ThresholdMonitors')
AND col_name(parent_object_id, parent_column_id) = 'LastAlertSentUtcDateTime';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[ThresholdMonitors] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[ThresholdMonitors] ALTER COLUMN [LastAlertSentUtcDateTime] [datetime] NULL
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.ThresholdMonitors')
AND col_name(parent_object_id, parent_column_id) = 'SupressionUntilUtcDateTime';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[ThresholdMonitors] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[ThresholdMonitors] ALTER COLUMN [SupressionUntilUtcDateTime] [datetime] NULL
