diff --git a/migrations/000.560.sql b/migrations/000.560.sql new file mode 100644 index 0000000..86d8cd1 --- /dev/null +++ b/migrations/000.560.sql @@ -0,0 +1,9 @@ +-- Updated unshipped Canada orders with DHL to FedEx Express +with unshipped_canada_orders as ( + select id + from orders + where paid = 1 and confirmed = 1 and delivered = 0 and canceled = 0 and credit_invoice = 0 + and market = 'CA' and delivery_method in ('dhl-dawpx-ddp', 'dhl-dawpx-dap') +) update orders set delivery_method = 'fedexExpressWorldDDP' where id in (select id from unshipped_canada_orders); +-- Too get a log which orders where updated: +-- ) select * from unshipped_canada_orders order by 1;