
--Migration_RCCP_20230620_150501.txt
CREATE TABLE [dbo].[ReportFrequentTables] (
    [ID] [bigint] NOT NULL IDENTITY,
    [ReportFrequecyId] [bigint] NOT NULL,
    [ReportId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.ReportFrequentTables] PRIMARY KEY ([ID])
)
CREATE TABLE [dbo].[ReportSchedulerSettings] (
    [ID] [bigint] NOT NULL IDENTITY,
    [Name] [nvarchar](max),
    [ReportId] [int] NOT NULL,
    [Schedule] [datetime] NOT NULL,
    [Active] [bit] NOT NULL,
    [OutputTemplate] [bigint] NOT NULL,
    [RuleId] [bigint] NOT NULL,
    [Frequency] [bigint] NOT NULL,
    [DayOfMonth] [bigint] NOT NULL,
    [ReportPeriod] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.ReportSchedulerSettings] PRIMARY KEY ([ID])
)
ALTER TABLE [dbo].[DashboardInstances] ADD [ReportType] [bigint] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[DashboardInstances] ADD [IsEdited] [bit] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[DashboardInstances] ADD [Parameters] [nvarchar](max)
ALTER TABLE [dbo].[DashboardTemplates] ADD [ReportType] [bigint] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[DashboardTemplates] ADD [IsEdited] [bit] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[DashboardTemplates] ADD [Parameters] [nvarchar](max)
