{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"Drupal 9.4 + paragraphs: Database table structure","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/906 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"906\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  \n<div class=\"document\">\n\n\n<ul class=\"simple\">\n<li>Pages (articles\/events) are stored in <tt class=\"docutils literal\">node<\/tt> table and have a <tt class=\"docutils literal\">nid<\/tt>, which you see in the URL when editing it.<\/li>\n<li>Paragraphs are added to a node in one or more fields of type &quot;paragraph&quot;. In my case, the field is called <tt class=\"docutils literal\">field_paragraphs<\/tt>, and the table is <tt class=\"docutils literal\">node__field_paragraphs<\/tt>. Mapping happens via <tt class=\"docutils literal\">entity_id<\/tt>, which is the <tt class=\"docutils literal\">node.nid<\/tt>. They have a <tt class=\"docutils literal\">field_paragraphs_target_id<\/tt> field.<\/li>\n<li>Generic paragraph data (type,language,revision) are stored in <tt class=\"docutils literal\">paragraphs_item_field_data<\/tt>, associated via <tt class=\"docutils literal\">node__field_paragraphs.field_paragraphs_target_id<\/tt> = <tt class=\"docutils literal\">paragraphs_item_field_data.id<\/tt>.<\/li>\n<li>Parent relations are stored in <tt class=\"docutils literal\">paragraphs_item_field_data<\/tt> (parent type + id), also associated via <tt class=\"docutils literal\">node__field_paragraphs.field_paragraphs_target_id<\/tt> = <tt class=\"docutils literal\">paragraphs_item_field_data.id<\/tt>.<\/li>\n<li>Field data of such a paragraph, e.g. a text, is in <tt class=\"docutils literal\">paragraph__field_text<\/tt>. Same association via the <tt class=\"docutils literal\">field_paragaphs_target_id<\/tt>.<\/li>\n<\/ul>\n<\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/906\/rev-raw\/169aad94540ea6bbff91cdafc6533ad898eeccd9\/README.rst\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/906#README.rst\">README.rst<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
