
--Migration_RCCP_20250313_085556.txt
ALTER TABLE [dbo].[Simulations] DROP CONSTRAINT [PK_dbo.Simulations]
CREATE TABLE [dbo].[ProductAreaLinks] (
    [Id] [bigint] NOT NULL IDENTITY,
    [ProductId] [uniqueidentifier] NOT NULL,
    [AreaId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.ProductAreaLinks] PRIMARY KEY ([Id])
)
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.Simulations')
AND col_name(parent_object_id, parent_column_id) = 'Id';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[Simulations] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[Simulations] ALTER COLUMN [Id] [bigint] NOT NULL
ALTER TABLE [dbo].[Simulations] ADD CONSTRAINT [PK_dbo.Simulations] PRIMARY KEY ([Id])

--Migration_RCCP_20250314_085557.txt
ALTER TABLE [dbo].[Simulations] DROP CONSTRAINT [PK_dbo.Simulations]
CREATE TABLE [dbo].[ProductAreaLinks] (
    [Id] [bigint] NOT NULL IDENTITY,
    [ProductId] [uniqueidentifier] NOT NULL,
    [AreaId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.ProductAreaLinks] PRIMARY KEY ([Id])
)
ALTER TABLE [dbo].[SiteFloorplanDetails] ADD [ThreeDimensionFloorplanData] [nvarchar](max)
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.Simulations')
AND col_name(parent_object_id, parent_column_id) = 'Id';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[Simulations] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[Simulations] ALTER COLUMN [Id] [bigint] NOT NULL
ALTER TABLE [dbo].[Simulations] ADD CONSTRAINT [PK_dbo.Simulations] PRIMARY KEY ([Id])

--Migration_RCCP_20250314_091158.txt
ALTER TABLE [dbo].[Simulations] DROP CONSTRAINT [PK_dbo.Simulations]
CREATE TABLE [dbo].[ProductAreaLinks] (
    [Id] [bigint] NOT NULL IDENTITY,
    [ProductId] [uniqueidentifier] NOT NULL,
    [AreaId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.ProductAreaLinks] PRIMARY KEY ([Id])
)
ALTER TABLE [dbo].[SiteFloorplanDetails] ADD [ThreeDimensionFloorplanData] [nvarchar](max)
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.Simulations')
AND col_name(parent_object_id, parent_column_id) = 'Id';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[Simulations] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[Simulations] ALTER COLUMN [Id] [bigint] NOT NULL
ALTER TABLE [dbo].[Simulations] ADD CONSTRAINT [PK_dbo.Simulations] PRIMARY KEY ([Id])

--Migration_RCCP_20250314_092227.txt
ALTER TABLE [dbo].[Simulations] DROP CONSTRAINT [PK_dbo.Simulations]
CREATE TABLE [dbo].[ProductAreaLinks] (
    [Id] [bigint] NOT NULL IDENTITY,
    [ProductId] [uniqueidentifier] NOT NULL,
    [AreaId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.ProductAreaLinks] PRIMARY KEY ([Id])
)
ALTER TABLE [dbo].[SiteFloorplanDetails] ADD [ThreeDimensionFloorplanData] [nvarchar](max)
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.Simulations')
AND col_name(parent_object_id, parent_column_id) = 'Id';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[Simulations] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[Simulations] ALTER COLUMN [Id] [bigint] NOT NULL
ALTER TABLE [dbo].[Simulations] ADD CONSTRAINT [PK_dbo.Simulations] PRIMARY KEY ([Id])
