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