WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 7 months ago

#10856 new enhancement

Move unessential comment fields to the comment meta table

Reported by: scribu Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.9
Component: Comments Keywords: has-patch dev-feedback
Focuses: Cc:

Description

The wp_comments table has 3 less-used fields that would be better placed in the new commentmeta table. These are:

  • comment_author_IP
  • comment_agent
  • comment_karma

Attachments (1)

comment_fields.diff (2.9 KB) - added by scribu 6 years ago.
Saves new data to comment meta. Still needs code for migrating old data

Download all attachments as: .zip

Change History (10)

comment:1 @scribu6 years ago

Related: #10747

@scribu6 years ago

Saves new data to comment meta. Still needs code for migrating old data

comment:2 @dd326 years ago

  • Keywords dev-feedback added
  • Version set to 2.9

Any chance of this in 2.9? With windows 7, The user agents are starting to grow.. making the field longer in the comments table works around it.. but storing meta as meta would be better way forward.

this patch could do with a compat to merge commentmeta with the $comments object if thats not already done.

comment:3 @scribu6 years ago

  • Cc scribu@… added

comment:4 follow-up: @Denis-de-Bernardy6 years ago

Imo, the IP address should stay in the comments table. It's potentially useful in there in order to mass-delete spammy comments.

comment:5 @ryan6 years ago

  • Milestone changed from 2.9 to Future Release

comment:6 @nacin5 years ago

Cross referencing #12668. Should be handled together.

comment:7 @gruvii4 years ago

  • Cc gruvii added

comment:8 in reply to: ↑ 4 @mitchoyoshitaka4 years ago

  • Cc mitcho@… added

Replying to Denis-de-Bernardy:

Imo, the IP address should stay in the comments table. It's potentially useful in there in order to mass-delete spammy comments.

Well, getting that data should just be one join away. It's not worth keeping that column in this table just for that reason. We should optimize for the 90% use case.

comment:9 @chriscct77 months ago

  • Summary changed from Move unesential comment fields to the comment meta table to Move unessential comment fields to the comment meta table

@nacin why is #12668 related to this one?

Note: See TracTickets for help on using tickets.