[wp-hackers] 2.4 Feature Proposal: New general meta-data table

Otto otto at ottodestruct.com
Thu Oct 4 18:43:34 GMT 2007


Also note that this one table could replace both the postmeta and the
options tables. If you consider the "blog" as a possible object with
an object_id (instead of a blog_id), that is. Might need an autoload
column to be fully compatible, I suppose.


On 10/4/07, Otto <otto at ottodestruct.com> wrote:
> Well, here's a first stab at it:
>
> CREATE TABLE $wpdb->meta (
>   meta_id bigint(20) NOT NULL auto_increment,
>   object_id bigint(20) NOT NULL default 0,
>   meta_type varchar(32) NOT NULL default '',
>   meta_key varchar(255) default NULL,
>   meta_value longtext,
>   PRIMARY KEY  (meta_id),
>   KEY meta_key (meta_key)
>   KEY meta_type (meta_type)
> ) $charset_collate;
>
> meta_id is a unique identifer for each meta entry.
> object_id is the id of whatever it links to (post, comment, whatever)
> meta_type defines what type of thing it's for (post, comment, whatever).
> key and value should be obvious.
>
>
>
> On 10/4/07, Andy Skelton <skeltoac at gmail.com> wrote:
> > I like it. A good starting point would be a CREATE TABLE statement.
> > Would you post it here when you've got it designed?
> >
> > Andy
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>


More information about the wp-hackers mailing list