Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 6 years ago

#8751 closed defect (bug) (fixed)

ID data types are inconsistent

Reported by: ramenboy's profile ramenboy Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

The data types for post and user IDs vary from table to table. Some columns are int(11), others are bigint(20); some are unsigned, and others are not. Assuming bigint(20) unsigned is the intended data type for post and user IDs, the following columns are inconsistent:

wp_comments:

  • comment_post_ID is int(11), should be bigint(20) unsigned
  • comment_parent is bigint(20), should be bigint(20) unsigned
  • user_id is bigint(20), should be bigint(20) unsigned

wp_links:

  • link_owner is int(11), should be bigint(20) unsigned

wp_postmeta:

  • post_id is bigint(20), should be bigint(20) unsigned

wp_posts:

  • post_author is bigint(20), should be bigint(20) unsigned
  • post_parent is bigint(20), should be bigint(20) unsigned
  • comment_count is bigint(20), should be bigint(20) unsigned

wp_usermeta:

  • umeta_id is bigint(20), should be bigint(20) unsigned
  • user_id is bigint(20), should be bigint(20) unsigned

comment_post_ID was supposedly fixed in #1621, but this fix seems to have been reverted at some point.

Change History (2)

#1 @Denis-de-Bernardy
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in a separate ticket

This ticket was mentioned in Slack in #core-multisite by pbiron. View the logs.


6 years ago

Note: See TracTickets for help on using tickets.