I've opened a database of drupal 7 and looked up in the tables node
, node_revisions
and node types
and couldn't find where drupal stores the actual body of the node (content).
Does anyone have a clue?
问题:
回答1:
Oh, I've just found it. In D7 they implemented fields to allow custom fields in content. So, the node body is considered just a field and its value is now stored in the table field_revision_body (in D7) instead of node_revision (in D6).
If you cite any references for drupal database structure that would be helpful.
Thanks for reading.
回答2:
In Drupal 7 all the fields in the base table are known as properties, like the title, author_id, current_time_stamp etc. All the other fields like body image and many other which you create are stored in other tables. Actually, Drupal make a separate table for every field in the database and store the primary key of the entity bundle (article, basic page) in that field_table as a foreign key. Basically Drupal make two tables for every field 1: is for storing the data (field_data_[name_of_field]) and 2: is for revision (field_revision_[name_of_field]).