You are here

UPGRADE.txt in Voting API 8.3

Same filename and directory in other branches
  1. 7.3 UPGRADE.txt
  2. 7.2 UPGRADE.txt
This document is intended to be a guide for developers upgrading a VotingAPI-
based module from one major version of VotingAPI or Drupal to the next.

VotingAPI 6.x-2.x to 7.x-2.x
----------------------------
The Drupal 7 upgrade for VotingAPI makes one important change: the
"content_type" and "content_id" terminology that's been present for several
years has been changed to avoid confusion with other parts of core.

VotingAPI has never stored individual *node* types, like 'story' or 'page',
and new developers often mistake the 'content_type' indicator in VotingAPI for
a node-type field. As such, VotingAPI now uses the names 'entity_type' and
'entity_id'.

When data is being passed into VotingAPI, be sure that you use the new 'entity'
terminology in your array keys, etc. In addition, if you're doing raw SQL
queries against the VotingAPI data in your database, be sure to change the
column names. A full search and replace for content_type and content_id,
replacing them with entity_type and entity_id, should do the trick.

File

UPGRADE.txt
View source
  1. This document is intended to be a guide for developers upgrading a VotingAPI-
  2. based module from one major version of VotingAPI or Drupal to the next.
  3. VotingAPI 6.x-2.x to 7.x-2.x
  4. ----------------------------
  5. The Drupal 7 upgrade for VotingAPI makes one important change: the
  6. "content_type" and "content_id" terminology that's been present for several
  7. years has been changed to avoid confusion with other parts of core.
  8. VotingAPI has never stored individual *node* types, like 'story' or 'page',
  9. and new developers often mistake the 'content_type' indicator in VotingAPI for
  10. a node-type field. As such, VotingAPI now uses the names 'entity_type' and
  11. 'entity_id'.
  12. When data is being passed into VotingAPI, be sure that you use the new 'entity'
  13. terminology in your array keys, etc. In addition, if you're doing raw SQL
  14. queries against the VotingAPI data in your database, be sure to change the
  15. column names. A full search and replace for content_type and content_id,
  16. replacing them with entity_type and entity_id, should do the trick.