1

I use drupal7.

According to the answer here,

  • {field_data_[field_name]} Standard data storage for a field.
  • {field_revision_[field_name]} Standard revision storage for a field.

I understand it, but, finally, they store the same values, right? This is because, I found that field_revision_field_xxx actually stores the updated values after I update a field-xxx.

[The reason why I ask this]
I try to transfer field values from one profile type to another which have the same uid. For it, I create field_data_field_xxx_transfered and field_revision_field_xxx_transfered and rewrite the pid in them.

I succeeded to transfer values from field_data_field_xxx to field_data_field_xxx_transfered. And, if field_revision_field_xxx stores the same values as field_data_field_xxx does, all I need to do is to copy field_data_field_xxx_transfered to field_revision_field_xxx_transfered. And, this is much easier than to do from field_revision_field_xxx to field_revision_field_xxx_transfered.

Thank you.

1 Answer 1

2

Yes, field_revision_[FIELD_NAME] contains the same value as field_data_[FIELD_NAME]. The only difference in both these table is, if you've enabled revision for entity having this field ([FIELD_NAME]), the field_data_[FIELD_NAME] will contain the latest revision value of the field and field_revision_[FIELD_NAME] will contain all revision value.

For example, Suppose I've a content type article with revision enabled, and has a field field_tags. I've then created a content of type article, so now field_data_field_tags and field_revision_field_tags contain data for the content I've just created. After this when ever I'll be updating this content, the field_data_field_tags will hold the latest revision data for field_tags field and field_revision_field_tags will hold all revision data for field_tags field i.e. revision id 1, 2, 3 and so on.

1
  • Thank you, Yogesh! I checked the way you answered and comfired it is right! Commented Nov 8, 2016 at 6:37

Your Answer

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

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