diff --git a/migrations/000.540.sql b/migrations/000.540.sql new file mode 100644 index 0000000..bc6b3da --- /dev/null +++ b/migrations/000.540.sql @@ -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 + );