
--Migration_RCCP_20230912_113647.txt
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] DROP CONSTRAINT [PK_dbo.DashboardReportInstanceUserLinks]
ALTER TABLE [dbo].[Users] ADD [ViewV9Layout] [bit] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[CompanySettings] ADD [ViewV9Layout] [bit] NOT NULL DEFAULT 0
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.DashboardReportInstanceUserLinks')
AND col_name(parent_object_id, parent_column_id) = 'ID';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] ALTER COLUMN [ID] [uniqueidentifier] NOT NULL
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] ADD CONSTRAINT [PK_dbo.DashboardReportInstanceUserLinks] PRIMARY KEY ([ID])

--Migration_RCCP_20230912_114711.txt
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] DROP CONSTRAINT [PK_dbo.DashboardReportInstanceUserLinks]
ALTER TABLE [dbo].[Users] ADD [ViewV9Layout] [bit] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[CompanySettings] ADD [ViewV9Layout] [bit] NOT NULL DEFAULT 0
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.DashboardReportInstanceUserLinks')
AND col_name(parent_object_id, parent_column_id) = 'ID';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] ALTER COLUMN [ID] [uniqueidentifier] NOT NULL
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] ADD CONSTRAINT [PK_dbo.DashboardReportInstanceUserLinks] PRIMARY KEY ([ID])

--Migration_RCCP_20230912_115305.txt
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] DROP CONSTRAINT [PK_dbo.DashboardReportInstanceUserLinks]
ALTER TABLE [dbo].[Users] ADD [ViewV9Layout] [bit] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[CompanySettings] ADD [ViewV9Layout] [bit] NOT NULL DEFAULT 0
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.DashboardReportInstanceUserLinks')
AND col_name(parent_object_id, parent_column_id) = 'ID';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] ALTER COLUMN [ID] [uniqueidentifier] NOT NULL
ALTER TABLE [dbo].[DashboardReportInstanceUserLinks] ADD CONSTRAINT [PK_dbo.DashboardReportInstanceUserLinks] PRIMARY KEY ([ID])
