
--Migration_RCCP_20240425_170053.txt
CREATE TABLE [dbo].[UserDashboardReportSessions] (
    [Id] [uniqueidentifier] NOT NULL DEFAULT newsequentialid(),
    [DashboardReportGuid] [nvarchar](max),
    [Type] [nvarchar](max),
    [Source] [nvarchar](max),
    [UserId] [bigint] NOT NULL,
    [Parameters] [nvarchar](max),
    [LastUpdatedUtcDateTime] [datetime] NOT NULL,
    CONSTRAINT [PK_dbo.UserDashboardReportSessions] PRIMARY KEY ([Id])
)
ALTER TABLE [dbo].[DashboardInstances] ADD [LastUpdatedUtcDateTime] [datetime]
ALTER TABLE [dbo].[DashboardTemplates] ADD [LastUpdatedUtcDateTime] [datetime]
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.FileSetLinks')
AND col_name(parent_object_id, parent_column_id) = 'FileID';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[FileSetLinks] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[FileSetLinks] ALTER COLUMN [FileID] [nvarchar](max) NULL
