
--Migration_RCCP_20251110_122755.txt
CREATE TABLE [dbo].[CompanyCubeSchemas] (
    [Id] [bigint] NOT NULL IDENTITY,
    [CubeName] [nvarchar](max),
    [SqlStatement] [nvarchar](max),
    [Dimensions] [nvarchar](max),
    [Measures] [nvarchar](max),
    [CreatedDateTime] [datetime] NOT NULL,
    [CompanyId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.CompanyCubeSchemas] PRIMARY KEY ([Id])
)
CREATE TABLE [dbo].[CompanyCubeSchemaVersions] (
    [SchemaId] [bigint] NOT NULL IDENTITY,
    [Version] [nvarchar](max),
    [CreatedDateTime] [datetime] NOT NULL,
    CONSTRAINT [PK_dbo.CompanyCubeSchemaVersions] PRIMARY KEY ([SchemaId])
)
ALTER TABLE [dbo].[FFCommissions] ADD [CloudId] [nvarchar](max)
ALTER TABLE [dbo].[PlannedSiteImages] ADD [UserId] [bigint]

--Migration_RCCP_20251110_165449.txt
CREATE TABLE [dbo].[CompanyCubeSchemas] (
    [Id] [bigint] NOT NULL IDENTITY,
    [CubeName] [nvarchar](max),
    [SqlStatement] [nvarchar](max),
    [Dimensions] [nvarchar](max),
    [Measures] [nvarchar](max),
    [CreatedDateTime] [datetime] NOT NULL,
    [CompanyId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.CompanyCubeSchemas] PRIMARY KEY ([Id])
)
CREATE TABLE [dbo].[CompanyCubeSchemaVersions] (
    [Id] [bigint] NOT NULL IDENTITY,
    [SchemaId] [bigint] NOT NULL,
    [Version] [nvarchar](max),
    [CreatedDateTime] [datetime] NOT NULL,
    CONSTRAINT [PK_dbo.CompanyCubeSchemaVersions] PRIMARY KEY ([Id])
)
ALTER TABLE [dbo].[FFCommissions] ADD [CloudId] [nvarchar](max)
ALTER TABLE [dbo].[PlannedSiteImages] ADD [UserId] [bigint]
