
--Migration_RCCP_20220823_182126.txt
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.AreaUsageSessionsSummaries')
AND col_name(parent_object_id, parent_column_id) = 'SessionId';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[AreaUsageSessionsSummaries] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[AreaUsageSessionsSummaries] ALTER COLUMN [SessionId] [bigint] NULL
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.AreaUsageSessionsSummaries')
AND col_name(parent_object_id, parent_column_id) = 'BookingId';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[AreaUsageSessionsSummaries] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[AreaUsageSessionsSummaries] ALTER COLUMN [BookingId] [bigint] NULL
DECLARE @var2 nvarchar(128)
SELECT @var2 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.AreaUsageSessionsSummaries')
AND col_name(parent_object_id, parent_column_id) = 'MeetingStartDateTime';
IF @var2 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[AreaUsageSessionsSummaries] DROP CONSTRAINT [' + @var2 + ']')
ALTER TABLE [dbo].[AreaUsageSessionsSummaries] ALTER COLUMN [MeetingStartDateTime] [datetime] NULL
DECLARE @var3 nvarchar(128)
SELECT @var3 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.AreaUsageSessionsSummaries')
AND col_name(parent_object_id, parent_column_id) = 'MeetingEndDateTime';
IF @var3 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[AreaUsageSessionsSummaries] DROP CONSTRAINT [' + @var3 + ']')
ALTER TABLE [dbo].[AreaUsageSessionsSummaries] ALTER COLUMN [MeetingEndDateTime] [datetime] NULL
