[wp-trac] [WordPress Trac] #39814: wp_usermeta uses umeta_id instead of meta_id
WordPress Trac
noreply at wordpress.org
Wed Feb 8 17:53:00 UTC 2017
#39814: wp_usermeta uses umeta_id instead of meta_id
-----------------------------+-----------------------------
Reporter: johnjamesjacoby | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 0.71
Severity: normal | Keywords: 2nd-opinion
Focuses: |
-----------------------------+-----------------------------
The `wp_usermeta` database table has an inconsistency compared to all
other meta-data tables, in that it's `meta_id` column is named `umeta_id`.
It has always had this, but there hasn't been a ticket on Trac
specifically for this that I could see (even if we decide to close it
right away.)
This discrepancy requires work-arounds in WordPress core, specifically in
the meta-data API. (See #11627.)
There are a few ways to look at this:
* Legacy, so we're stuck with it
* Benign, so leave it alone
* Changing it may cause more harm than good, so ignore it
----
Personally, it's uniqueness bothers my OCD more than supporting a schema
change would, so my vote is to: rename it in a database upgrade, upgrade
core's related database queries, and add pre-flight string-replace to WPDB
to protect custom queries from failing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39814>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list