-- Changelog module compatibility backfill
-- Adjust table prefix if your environment does not use `wpjy_`.

UPDATE wpjy_changelogs
SET status = 'published'
WHERE COALESCE(status, '') IN ('', 'publicado');

UPDATE wpjy_changelogs
SET conteudo_md = conteudo_markdown
WHERE COALESCE(conteudo_md, '') = ''
  AND COALESCE(conteudo_markdown, '') <> '';

UPDATE wpjy_changelogs
SET conteudo_markdown = conteudo_md
WHERE COALESCE(conteudo_markdown, '') = ''
  AND COALESCE(conteudo_md, '') <> '';
