[wp-trac] [WordPress Trac] #38265: Add term_relationship_id column to wp_term_relationships

WordPress Trac noreply at wordpress.org
Sun Oct 9 01:11:02 UTC 2016


#38265: Add term_relationship_id column to wp_term_relationships
-----------------------------+-------------------------------------
 Reporter:  johnjamesjacoby  |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Taxonomy         |    Version:
 Severity:  normal           |   Keywords:  2nd-opinion needs-patch
  Focuses:                   |
-----------------------------+-------------------------------------
 I have a need to attach additional information to the post/term
 relationships themselves. I'd prefer not to stash this data in postmeta or
 termmeta, as this data is strictly about the connection between the two,
 and not about either object.

 Naturally, my solution for this is to create a metadata database table
 (like we did with comments years ago, and taxonomy terms recently.) The
 first of many steps towards a `term_relationshipmeta` database table is
 that `wp_term_relationships` lacks a `term_relationship_id` primary column
 in the database.

 ----

 On the extreme end of this idea, probably lives a `WP_Term_Relationship`
 object, with methods for adding/editing/removing relationships, which the
 `wp_*_object_terms` functions would become wrappers for.

 Before any of that is really feasible, or for very much work to continue
 even in private as a plugin first, term relationships need a unique
 identifier.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38265>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list