WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10233 closed feature request (duplicate)

Add generic metadata table

Reported by: scribu Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: needs-patch
Focuses: Cc:

Description

Over time, there have been requests for category metadata, comment metadata and even link metadata.

In one of the more recent discussions on this topic, a generic metadata table has been proposed.

I also think that this is the way to go forward: instead of having a separate table for each object type, just have a single, generic, plugin friendly table.

This table would have the following columns:

object_id
object_type
meta_id
meta_key
meta_value

It's basically the same as the current postmeta and usermeta, except that post_id and user_id are replaced with object_id. Also, a new column 'object_type' would simplify lookups.

Change History (7)

comment:1 scribu5 years ago

Also see #2659

comment:2 Denis-de-Bernardy5 years ago

  • Milestone 2.9 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

and #5183

comment:3 scribu5 years ago

Ok, I officially hate Trac search. :-|

comment:4 demetris5 years ago

Trac search is perfect! :-D

Here is a query with the three specific terms from the title of this ticket:

http://core.trac.wordpress.org/search?q=metadata+table+generic

It returns this ticket plus the two others mentioned.

comment:5 scribu5 years ago

Oh, so that's how you do it:

  1. Write ticket
  2. Hit preview
  3. Search trac with the title of the ticket
  4. Realize that it's a dup

Got it. :)

comment:6 demetris5 years ago

No, it’s not like that...

  1. You are supposed to know what you are after.
  1. You are supposed to be able to choose specific terms that summarize that well (I wouldn’t believe that you are not, and the title you selected shows that you are indeed).
  1. You use these terms to do a search BEFORE starting to write.

:-)

(And, of course, you don’t give up after the first query. You try a couple more variations, to see if there is something closer to what you look for.)

At least that’s how I search, here as well as in everywhere else.

comment:7 scribu5 years ago

Ok, thanks for the tips. :)

Note: See TracTickets for help on using tickets.