Files
database/migrations/archive/000.095.sql
T
Rikard BartholfandGitHub ddcbd0afb0 Archive old migrations (#426)
* Archive old migrations

* Fix invalid placement of migrations
2024-10-17 11:19:12 +02:00

8 lines
319 B
SQL

-- P5-3678 delete state from non-US orders
DELETE FROM "order-orders_fields"
WHERE fieldid = 235 AND orderid IN (
SELECT orders.orderid FROM "order-orders" orders
JOIN "order-orders_fields" countryCode ON countryCode.fieldid = 151 AND countryCode.orderid = orders.orderid
WHERE countryCode.value != 'US'
);