[wp-hackers] Meta tables: Take 5
otto at ottodestruct.com
Sat Jul 25 05:29:26 UTC 2009
I considered enums as well, but the alter table problem I think makes
a big difference. We don't have anything doing alters except on
upgrades at present, making it alter the table like this seems
problematic to me.
I'd be happier with strings. We already use strings for types
elsewhere (comment_type is comment, ping, etc.. post_type is page,
I don't think the overhead is going to be enough to make any
difference except in huge scales. Perhaps some testing is in order?
On Fri, Jul 24, 2009 at 4:50 PM, scribu<scribu at gmail.com> wrote:
>> There are two downsides to this (that I know of):
>> 1.) Using ENUMs makes synchronization between two databases more fragile
>> because ENUMs could be listed in different orders. Having routines that
>> encapsulate this handling would resolve most of this.
> I don't think this is a concern for regular users. And the pros ought to
> know what they're doing.
> 2.) A core function to register the new type would need to be able to ALTER
>> the table and I don't know if this will be an issue on "highly secure"
>> environments, i.e.
> dbDelta uses ALTER when updating Core. Some plugins also use ALTER
> statements to add columns to existing table, so it's nothing out of the
> In conclusion, I think using enum is a good ideea.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers