[wp-hackers] 2.4 Feature Proposal: New general meta-data table
peter.westwood at ftwr.co.uk
Fri Oct 12 06:42:55 GMT 2007
On 12 Oct 2007, at 07:37, Otto wrote:
> Probably some I left out. On the whole, I'm in favor of a combined
> table simply for the reason that the internal bits of WordPress need
> it. Why have a postmeta, options, commentsmeta, etc? One table can
> handle these better. We're doing weird stuff in WP too, like
> attachments as posts and other things that would be better served by
> good metadata. A refactoring of these is in order, and if a combined
> meta helps push that along, I'm all for it.
A single meta table makes much more sense than adding a new
comment_meta table if we want to have meta information for comments
(which some people do)
Moving options to a meta table is IMHO a bad idea - if you are going
to do that you might as well just do away with the post table and
comments tables as well and store all the data in one big table as
A meta table should just be for meta - i.e. key<>vlaue pairs which
are related to a particular object type be it a comment/post/...
Plugins should be using these tables where they want to store that
type of information - unfortunately a lot of plugin authors do not
understand the flexibility that already exists in the WP db schema
and so for example every new event plugin creates a new table - the
fact that the posts table has the ability there to store other types
of post (and to be fair an event is very similar it what it wants to
store) and the posts table could support events as-is.
As for attachments -> making them post meta sounds like a really good
idea - doing away with the dodgy linked page for an attachment which
can have very hard to moderate comments would be a good idea!
Peter Westwood <peter.westwood at ftwr.co.uk>
WordPress Plugins: http://blog.ftwr.co.uk/wordpress/
More information about the wp-hackers