
--Migration_RCCP_20241203_134153.txt
ALTER TABLE [dbo].[BranchCatchmentCompetitors] ADD [BranchType] [nvarchar](max)
ALTER TABLE [dbo].[BranchCatchmentDatas] ADD [BranchType] [nvarchar](max)
ALTER TABLE [dbo].[PlannedSites] ADD [Country] [nvarchar](max)
ALTER TABLE [dbo].[PlannedSites] ADD [CompanyId] [bigint] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[PlannedSites] ADD [StoreType] [nvarchar](max)
ALTER TABLE [dbo].[PlannedSites] ADD [FloorSize] [float] NOT NULL DEFAULT 0
ALTER TABLE [dbo].[PlannedSites] ADD [StoreImage] [nvarchar](max)
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.BranchCatchmentCompetitors')
AND col_name(parent_object_id, parent_column_id) = 'BranchId';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[BranchCatchmentCompetitors] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[BranchCatchmentCompetitors] ALTER COLUMN [BranchId] [nvarchar](max) NULL
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.BranchCatchmentDatas')
AND col_name(parent_object_id, parent_column_id) = 'BranchId';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[BranchCatchmentDatas] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[BranchCatchmentDatas] ALTER COLUMN [BranchId] [nvarchar](max) NULL
