WordPress.org

Make WordPress Core

Opened 11 months ago

#38265 new feature request

Add term_relationship_id column to wp_term_relationships

Reported by: johnjamesjacoby Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: 2nd-opinion needs-patch
Focuses: Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.