
--Migration_RCCP_20260427_170302.txt
CREATE TABLE [dbo].[ProductPlots] (
    [ID] [bigint] NOT NULL IDENTITY,
    [FloorplanID] [bigint] NOT NULL,
    [FloorplanGuid] [uniqueidentifier] NOT NULL,
    [ProductPlotName] [nvarchar](max),
    [ProductPlotCode] [nvarchar](max),
    [ProductId] [nvarchar](max),
    [RotateDegree] [float] NOT NULL,
    [Status] [nvarchar](max),
    [Coverage] [nvarchar](max),
    [CreatedUtcDateTime] [datetime],
    [LastUpdatedUtcDateTime] [datetime],
    CONSTRAINT [PK_dbo.ProductPlots] PRIMARY KEY ([ID])
)
CREATE INDEX [IX_FloorplanID] ON [dbo].[ProductPlots]([FloorplanID])
ALTER TABLE [dbo].[ProductPlots] ADD CONSTRAINT [FK_dbo.ProductPlots_dbo.SiteFloorplanDetails_FloorplanID] FOREIGN KEY ([FloorplanID]) REFERENCES [dbo].[SiteFloorplanDetails] ([ID]) ON DELETE CASCADE
