




UPDATE pages
   SET body = CONCAT(body, '\n\n[contact_form]')
 WHERE has_contact_form = 1
   AND body NOT LIKE '%[contact_form]%';

UPDATE page_translations pt
   JOIN pages p ON p.id = pt.page_id
   SET pt.body = CONCAT(pt.body, '\n\n[contact_form]')
 WHERE p.has_contact_form = 1
   AND pt.body IS NOT NULL
   AND pt.body <> ''
   AND pt.body NOT LIKE '%[contact_form]%';
