From ae0fa9c4ece2a6556695afefbfab58132dc5c32e Mon Sep 17 00:00:00 2001 From: fredrikphotowall <35255659+fredrikphotowall@users.noreply.github.com> Date: Mon, 28 Sep 2020 15:48:54 +0200 Subject: [PATCH] P5-5822 Add DHL Economy EU and World delivery methods --- migrations/000.240.sql | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 migrations/000.240.sql diff --git a/migrations/000.240.sql b/migrations/000.240.sql new file mode 100644 index 0000000..f615caa --- /dev/null +++ b/migrations/000.240.sql @@ -0,0 +1,31 @@ +-- P5-5822/5832 Add new shipping option DHL Economy + +INSERT INTO "delivery-methods" (id, name) VALUES + (15, 'dhlEconomyEU'), + (16, 'dhlEconomyWorld'); + +-- Add DHL Economy World everywhere DHL is used with DHL's current price +INSERT INTO "delivery-methods_prices" (method, option, option_value, currency, price, territory) + SELECT 16, '', '', currency, price, territory + FROM "delivery-methods_prices" + WHERE method = 10 +; + +-- Add DHL Economy EU everywhere DHL Express is used (EU) with DHL Express' current price (zero) +INSERT INTO "delivery-methods_prices" (method, option, option_value, currency, price, territory) + SELECT 15, '', '', currency, price, territory + FROM "delivery-methods_prices" + WHERE method = 14 +; + +-- Add 7 to price of all USD and EUR DHL entries +UPDATE "delivery-methods_prices" + SET price = price + 7 + WHERE method = 10 AND currency in ('EUR','USD'); +; + +-- Add 7 to price of all EUR and GBP DHL Express entries +UPDATE "delivery-methods_prices" + SET price = price + 7 + WHERE method = 14 AND currency in ('EUR', 'GBP') +;