UPDATE articles
SET wizard_state_json = wizard_state_json - 'platforms' - 'target_platforms' - 'target_platform',
    updated_at = NOW()
WHERE wizard_state_json IS NOT NULL
  AND wizard_state_json ?| ARRAY['platforms', 'target_platforms', 'target_platform'];

UPDATE generation_tasks
SET input_params_json = input_params_json - 'platforms' - 'target_platforms' - 'target_platform',
    updated_at = NOW()
WHERE input_params_json IS NOT NULL
  AND input_params_json ?| ARRAY['platforms', 'target_platforms', 'target_platform'];
