From a47fffbeded02a9a8127816b17ac95cdcc286076 Mon Sep 17 00:00:00 2001 From: Fredrik Ringqvist <35255659+fredrikphotowall@users.noreply.github.com> Date: Wed, 24 May 2023 11:38:57 +0200 Subject: [PATCH] Add fedex standard+express worldwide, replace dhl everywhere except UK (#326) --- migrations/000.418.sql | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 migrations/000.418.sql diff --git a/migrations/000.418.sql b/migrations/000.418.sql new file mode 100644 index 0000000..78a6d34 --- /dev/null +++ b/migrations/000.418.sql @@ -0,0 +1,27 @@ +-- Add new delivery methods +INSERT INTO "delivery-methods" (id, name) VALUES (20, 'fedexExpressWorld'); +INSERT INTO "delivery-methods" (id, name) VALUES (21, 'fedexStandardWorld'); + +-- Replace remaining countries using DHL Express for EU countries (14-dhlExpress) with 18-fedexExpressEU +UPDATE "delivery-methods_prices" SET method = 18 WHERE method = 14; + +-- Replace remaining countries using method 15-dhlEconomyEU with 19-fedexStandardEU +UPDATE "delivery-methods_prices" SET method = 19 WHERE method = 15; + +-- Replace DHL Express world wide (10-dhl) with new fedexExpressWorld method (except UK) +UPDATE "delivery-methods_prices" SET method = 20 WHERE method = 10 AND territory != 'GB'; + +-- Replace DHL Economy world (16-dhlEconomyWorld) with new fedexStandardWorld method +UPDATE "delivery-methods_prices" SET method = 21 WHERE method = 16; + + +-- "delivery-methods" ids +-- 10 | dhl +-- 14 | dhlExpress +-- 15 | dhlEconomyEU +-- 16 | dhlEconomyWorld +-- 18 | fedexExpressEU +-- 19 | fedexStandardEU +-- +-- For this particular table I happen to know that the ids will be the same cross database, so safe to use. +-- We know this from past migrations, and that its id sequence is out of sync. \ No newline at end of file