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