diff --git a/migrations/000.373.sql b/migrations/000.373.sql new file mode 100644 index 0000000..627a2b8 --- /dev/null +++ b/migrations/000.373.sql @@ -0,0 +1,17 @@ +-- Update delivery methods for AU and SG + +-- Add free delivery methods to Australia and Singapore +INSERT INTO "delivery-methods_prices" (territory, currency, option, option_value, price, method) VALUES + ('AU', 'AUD', '', '', 0, (select id from "delivery-methods" where name = 'dhlEconomyWorld')), + ('SG', 'USD', '', '', 0, (select id from "delivery-methods" where name = 'dhlEconomyWorld')) +; + +-- Update DHL Express price for AU+SG +UPDATE "delivery-methods_prices" + SET price = (SELECT 10 / vat FROM markets WHERE name = 'AU') + WHERE territory = 'AU' AND currency = 'AUD' AND method = 10; + +UPDATE "delivery-methods_prices" + SET price = (SELECT 7 / vat FROM markets WHERE name = 'SG') + WHERE territory = 'SG' AND currency = 'USD' AND method = 10; +