[wp-trac] [WordPress Trac] #39507: Increase the length of comment_type field in wp_comments table

WordPress Trac noreply at wordpress.org
Mon Jan 9 03:57:46 UTC 2017


#39507: Increase the length of comment_type field in wp_comments table
-------------------------+------------------------------
 Reporter:  slaFFik      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Comments     |     Version:  1.5
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by dd32):

 Worth noting that `comment_type` and `post_type` are both `VARCHAR(20)`
 while `taxonomy` is `VARCHAR(32)`.

 I'm not sure I see benefit in these fields being longer, they're designed
 as a short unique grouping of objects.

 @slaFFik I'd be interested in hearing more about what you're storing in
 the field - it kind of sounds like it's metadata that really should just
 be stored as comment meta, I don't think the extra SQL query should be a
 blocker for that - if performance is an issue I'd be looking at using an
 object cache to improve it instead.

 Related: #37104 for increasing the `post_type` length.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39507#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list