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

WordPress Trac noreply at wordpress.org
Tue Oct 24 15:17:15 UTC 2017


#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                   |  Resolution:
 Keywords:  2nd-opinion needs-patch  |     Focuses:
-------------------------------------+------------------------------

Comment (by johnjamesjacoby):

 > term relationships need a unique identifier

 This probably deserves a correction. Term relationships are unique thanks
 to their primary key being a combination of the `object_id` and
 `term_taxonomy_id`. Unfortunately, the meta-data API (as it exists today)
 only knows how to work with single IDs, and also expects that ID to be an
 `INT`, so it's not even possible to hack together a creative solution.

 If a `wp_term_relationshipmeta` database table were to exist today, it
 would need a dedicated meta-data API to accommodate its unique lack of a
 single primary integer key.

 ----

 I'm going to attach a patch shortly to show my suggested schema changes
 for new installations. The necessary alters to upgrade this database table
 may come later, if this suggestion is sound.

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


More information about the wp-trac mailing list