Files
database/migrations/archive/000.263.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
455 B
SQL

-- P5-6276: add payment type to credit orders
insert into "order-orders_fields" (orderid, fieldid, value)
select cancelled_by_order_id.value::integer, 170, payment_type.value
from "order-orders" orders
join "order-orders_fields" payment_type on payment_type.fieldid = 170 and payment_type.orderid = orders.orderid
join "order-orders_fields" cancelled_by_order_id on cancelled_by_order_id.fieldid = 238 and cancelled_by_order_id.orderid = orders.orderid;