
--Migration_RCCP_20241118_183840.txt
ALTER TABLE [dbo].[SiteFootfallConfigurations] ADD [EntityType] [nvarchar](max)
ALTER TABLE [dbo].[SiteFootfallConfigurations] ADD [EntityTypeId] [nvarchar](max)
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.FFBranches')
AND col_name(parent_object_id, parent_column_id) = 'ReturningCustomerScalingFactor';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[FFBranches] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[FFBranches] DROP COLUMN [ReturningCustomerScalingFactor]
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.FFBranches')
AND col_name(parent_object_id, parent_column_id) = 'VisitDurationScalingFactor';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[FFBranches] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[FFBranches] DROP COLUMN [VisitDurationScalingFactor]

--Migration_RCCP_20241118_184444.txt
ALTER TABLE [dbo].[SiteFootfallConfigurations] ADD [EntityType] [nvarchar](max)
ALTER TABLE [dbo].[SiteFootfallConfigurations] ADD [EntityTypeId] [nvarchar](max)
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.FFBranches')
AND col_name(parent_object_id, parent_column_id) = 'ReturningCustomerScalingFactor';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[FFBranches] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[FFBranches] DROP COLUMN [ReturningCustomerScalingFactor]
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.FFBranches')
AND col_name(parent_object_id, parent_column_id) = 'VisitDurationScalingFactor';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[FFBranches] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[FFBranches] DROP COLUMN [VisitDurationScalingFactor]
