Skip to content

Commit

Permalink
nopSolutions#4832 Fixed upgrade script;
Browse files Browse the repository at this point in the history
delete the migrations of not installed plugins to avoid problems with their installation on the future
  • Loading branch information
skoshelev committed Jun 9, 2020
1 parent 25072d1 commit cc47891
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions upgradescripts/4.20-4.30 (under development)/upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3307,4 +3307,39 @@ BEGIN
INSERT [Setting] ([Name], [Value], [StoreId])
VALUES (N'commonsettings.restarttimeout', N'3000', 0)
END
GO

-- remove the Nop.Plugin.Widgets.FacebookPixel plugin migration if it table not exists
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = object_id(N'[FacebookPixelConfiguration]') AND objectproperty(object_id, N'IsUserTable') = 1)
BEGIN
DELETE FROM [MigrationVersionInfo] WHERE [Description] = 'Widgets.FacebookPixel base schema';
END
GO

-- remove the Nop.Plugin.Tax.FixedOrByCountryStateZip plugin migration if it table not exists
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = object_id(N'[TaxRate]') AND objectproperty(object_id, N'IsUserTable') = 1)
BEGIN
DELETE FROM [MigrationVersionInfo] WHERE [Description] = 'Tax.FixedOrByCountryStateZip base schema';
END
GO

-- remove the Nop.Plugin.Tax.Avalara plugin migration if it table not exists
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = object_id(N'[TaxTransactionLog]') AND objectproperty(object_id, N'IsUserTable') = 1)
BEGIN
DELETE FROM [MigrationVersionInfo] WHERE [Description] = 'Tax.Avalara base schema';
END
GO

-- remove the Nop.Plugin.Shipping.FixedByWeightByTotal plugin migration if it table not exists
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = object_id(N'[ShippingByWeightByTotalRecord]') AND objectproperty(object_id, N'IsUserTable') = 1)
BEGIN
DELETE FROM [MigrationVersionInfo] WHERE [Description] = 'Shipping.FixedByWeightByTotal base schema';
END
GO

-- remove the Nop.Plugin.Pickup.PickupInStore plugin migration if it table not exists
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = object_id(N'[StorePickupPoint]') AND objectproperty(object_id, N'IsUserTable') = 1)
BEGIN
DELETE FROM [MigrationVersionInfo] WHERE [Description] = 'Pickup.PickupInStore base schema';
END
GO

0 comments on commit cc47891

Please sign in to comment.