[wp-hackers] 2.4 Feature Proposal: New general meta-data table
Otto
otto at ottodestruct.com
Thu Oct 4 23:41:46 GMT 2007
On 10/4/07, Omry Yadan <omry at yadan.net> wrote:
> I don't think putting the options there would be a good idea.
>
> many users understand the options table and know how to change values
> there manually.
>
> putting it into a generic metadata table will make wordpress much more
> opaque to users.
Bah. Good database design waits not for users manually editing things!
Plugins will no doubt adapt (or not notice, if they're using the add
and remove options functions).
On 10/4/07, Andy Skelton <skeltoac at gmail.com> wrote:
> At first glance, this does not look like a good move. It would seem to
> confuse things.
>
> However, if you consider the blog as an object with the implicit ID of
> 1, it makes perfect sense. Taking it further, into the context of
> WPMU, there is a blogs table where each blog has an ID and a sites
> table where each site has an ID.
That was my basic line of thought, yeah. The options table is nothing
more than key/value pairs tied to a blog_id. For MU, this also means
that options can be fully separated without wacky option naming
conventions.
Pretty much any table you care to create is going to have some kind of
unique ID field. If it then contains key/value pairs, it can fit into
this meta table design, as long as it also has a unique meta_type. The
meta_type could even be as simple as the name of the other table that
the meta_id is referring to.
More information about the wp-hackers
mailing list