Delete redundant discount data from order_rows (#466)

* Delete redundant discount data from order_rows

* Bump revision prior release
This commit is contained in:
Rikard Bartholf
2025-03-10 09:04:10 +01:00
committed by GitHub
parent 3230d31134
commit 9dee3d1f3c
+11
View File
@@ -0,0 +1,11 @@
UPDATE order_rows
SET data = data
- 'discount_amount'
- 'discountType'
- 'discountValue'
WHERE id IN (
SELECT id
FROM order_rows
WHERE NOT data->>'reprinted_order_row_id' IS NULL
AND NOT data->>'discount_amount' IS NULL
);