WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 3 years ago

#10856 new enhancement

Move unesential 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 5 years ago.
Saves new data to comment meta. Still needs code for migrating old data

Download all attachments as: .zip

Change History (9)

comment:1 scribu5 years ago

Related: #10747

scribu5 years ago

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

comment:2 dd324 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 scribu4 years ago

  • Cc scribu@… added

comment:4 follow-up: Denis-de-Bernardy4 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 ryan4 years ago

  • Milestone changed from 2.9 to Future Release

comment:6 nacin4 years ago

Cross referencing #12668. Should be handled together.

comment:7 gruvii3 years ago

  • Cc gruvii added

comment:8 in reply to: ↑ 4 mitchoyoshitaka3 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.

Note: See TracTickets for help on using tickets.