0

I created few custom fields for user registration in Drupal 7.

When I add the "First name" field, two tables are created: field_data_field_first_name, and field_revision_field_first_name.

Why are there two tables, if they contain the same data?

1 Answer 1

1

You can find the answer on your question on Duplicate data in field_data* and field_revision* tables. In particular, see this comment:

The field_revision tables store the revision id, which never changes in these tables. The field_data tables store the node's current revision id and does not store old revision data. Basically the field_data tables only ever contain 1 entry per node. The field_revisions table will contain the number of revisions you've created, preserving the revision data. So if you never use revisions, then yes, the tables will contain identical data.

Since revisions are a core part of Drupal I don't think there's anything you can do about this. You can probably delete the contents of the field_revision tables (please test first, don't take my word for it!), but as soon as you start creating/editing nodes the field_revision tables will repopulate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.