
--Migration_RCCP_20260302_085520.txt
ALTER TABLE [dbo].[AreaMetrics] DROP CONSTRAINT [PK_dbo.AreaMetrics]
ALTER TABLE [dbo].[StaffProfileTypicalBehaviorLinks] DROP CONSTRAINT [PK_dbo.StaffProfileTypicalBehaviorLinks]
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.AreaMetrics')
AND col_name(parent_object_id, parent_column_id) = 'Id';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[AreaMetrics] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[AreaMetrics] ALTER COLUMN [Id] [uniqueidentifier] NOT NULL
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.StaffProfileTypicalBehaviorLinks')
AND col_name(parent_object_id, parent_column_id) = 'Id';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[StaffProfileTypicalBehaviorLinks] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[StaffProfileTypicalBehaviorLinks] ALTER COLUMN [Id] [uniqueidentifier] NOT NULL
ALTER TABLE [dbo].[AreaMetrics] ADD CONSTRAINT [PK_dbo.AreaMetrics] PRIMARY KEY ([Id])
ALTER TABLE [dbo].[StaffProfileTypicalBehaviorLinks] ADD CONSTRAINT [PK_dbo.StaffProfileTypicalBehaviorLinks] PRIMARY KEY ([Id])
