Use [REPLACE Cloud Assert Biling DB Name Here!!!]

IF object_id(N'[dbo].[FK_dbo.AddOnRequestStatus_dbo.Subscriptions_SubscriptionId]', N'F') IS NOT NULL
    ALTER TABLE [dbo].[AddOnRequestStatus] DROP CONSTRAINT [FK_dbo.AddOnRequestStatus_dbo.Subscriptions_SubscriptionId]
IF EXISTS (SELECT name FROM sys.indexes WHERE name = N'IX_SubscriptionId' AND object_id = object_id(N'[dbo].[AddOnRequestStatus]', N'U'))
    DROP INDEX [IX_SubscriptionId] ON [dbo].[AddOnRequestStatus]
DROP TABLE [dbo].[AddOnRequestStatus]
DELETE [dbo].[__MigrationHistory]
WHERE (([MigrationId] = N'201706210545149_CreateAddOnRequestStatusTable') AND ([ContextKey] = N'CloudAssert.WAP.Billing.Persistence.Sql.Migrations.Configuration'))
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.BillingInvoices')
AND col_name(parent_object_id, parent_column_id) = 'ProcessingToFtpServerStatusString';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[BillingInvoices] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[BillingInvoices] DROP COLUMN [ProcessingToFtpServerStatusString]
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.BillingInvoices')
AND col_name(parent_object_id, parent_column_id) = 'ProcessingToFtpServerStatus';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[BillingInvoices] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[BillingInvoices] DROP COLUMN [ProcessingToFtpServerStatus]
DELETE [dbo].[__MigrationHistory]
WHERE (([MigrationId] = N'201704061354201_AddFtpProcessingStatusColumnInInvoiceTable') AND ([ContextKey] = N'CloudAssert.WAP.Billing.Persistence.Sql.Migrations.Configuration'))
