Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does drupal 7 store the actual content in the database?

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?

like image 950
Bassel Alkhateeb Avatar asked Dec 06 '22 04:12

Bassel Alkhateeb


2 Answers

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.

like image 121
Bassel Alkhateeb Avatar answered Dec 08 '22 14:12

Bassel Alkhateeb


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]).

like image 26
Fawad Ali Avatar answered Dec 08 '22 16:12

Fawad Ali