10 lines
272 B
MySQL
10 lines
272 B
MySQL
|
UPDATE actor_profile
|
||
|
SET payment_options = (
|
||
|
-- remove all payment options except links
|
||
|
SELECT COALESCE (
|
||
|
jsonb_agg(opt) FILTER (WHERE opt ->> 'payment_type' = '1'),
|
||
|
'[]'
|
||
|
)
|
||
|
FROM jsonb_array_elements(actor_profile.payment_options) AS opt
|
||
|
);
|