I need to change the Text format of the body field of 200 node of the "flats" content type.
I guess I can do it in the database but I don't know where to look.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityThe query you suggested is great but if you want to make sure you're only including body fields from the content type you want to update you need to extend it slightly:
UPDATE field_data_body
SET body_format = REPLACE(body_format, 'plain_text', 'full_html')
WHERE entity_type = 'node' AND bundle = 'flats'
You'll also need to run the same query for the field_revision_body
table or nothing will happen:
UPDATE field_revision_body
SET body_format = REPLACE(body_format, 'plain_text', 'full_html')
WHERE entity_type = 'node' AND bundle = 'flats'
update field_data_body set body_format =REPLACE(body_format, 'plain_text', 'full_html');
WHERE entity_type = 'node' AND bundle = 'flats'
so you don't update it for the wrong content type