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

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