This is a page to track primary key storage in other fields in the core and in extensions used on WMF wikis. Nearly all of the primary keys are auto-incrementing numerical keys. Exceptions are marked accordingly. log_search.ls_value is not included here, but it can contain any number of primary keys.
Usage
Core
| Primary key | Storage elsewhere | 
|---|---|
| actor.actor_id | archive.ar_actor | 
| filearchive.fa_actor | |
| image.img_actor | |
| ipblocks.ipb_by_actor | |
| oldimage.oi_actor | |
| logging.log_actor | |
| recentchanges.rc_actor | |
| archive.ar_id | N/A | 
| category.cat_id | N/A | 
| comment.comment_id | revision_comment_temp.revcomment_comment_id | 
| archive.ar_comment_id | |
| ipblocks.ipb_reason_id | |
| image.img_description_id | |
| image_comment_temp.imgcomment_description_id | |
| oldimage.oi_description_id | |
| filearchive.fa_deleted_reason_id | |
| filearchive.fa_description_id | |
| recentchanges.rc_comment_id | |
| logging.log_comment_id | |
| protected_titles.pt_reason_id | |
| revision.rev_comment_id | |
| content.content_id | slots.slot_content_id | 
| externallinks.el_id | N/A | 
| filearchive.fa_id | N/A | 
| image.img_name (Note this primary key is not a numerical index, but the file name!) | image_comment_temp.imgcomment_name | 
| ip_changes.ipc_rev_id | N/A | 
| ipblocks.ipb_id | ipblocks.ipb_parent_block_id | 
| job.job_id | N/A | 
| linktarget.lt_id | N/A | 
| logging.log_id | change_tag.ct_log_id | 
| log_search.ls_log_id | |
| recentchanges.rc_logid | |
| tag_summary.ts_log_id | |
| page.page_id | archive.ar_page_id | 
| categorylinks.cl_from | |
| externallinks.el_from | |
| hitcounter.hc_id (removed in 1.25) | |
| imagelinks.il_from | |
| iwlinks.iwl_from | |
| langlinks.ll_from | |
| logging.log_page | |
| pagelinks.pl_from | |
| page_props.pp_page | |
| page_restrictions.pr_page | |
| recentchanges.rc_cur_id | |
| redirect.rd_from | |
| revision.rev_page | |
| searchindex.si_page | |
| templatelinks.tl_from | |
| page_restrictions.pr_id | N/A | 
| recentchanges.rc_id | change_tag.ct_rc_id | 
| tag_summary.ts_rc_id | |
| revision.rev_id | archive.ar_rev_id | 
| archive.ar_parent_id | |
| change_tag.ct_rev_id | |
| ip_changes.ipc_rev_id | |
| page.page_latest | |
| recentchanges.rc_this_oldid | |
| recentchanges.rc_last_oldid | |
| revision.rev_parent_id | |
| revision_comment_temp.revcomment_rev | |
| tag_summary.ts_rev_id | |
| slots.slot_revision_id | |
| sites.site_id | N/A | 
| site_stats.ss_row_id | N/A | 
| slot_roles.role_id | slots.slot_role_id | 
| text.old_id | archive.ar_text_id | 
| revision.rev_text_id | |
| user.user_id | archive.ar_user | 
| filearchive.fa_deleted_user | |
| filearchive.fa_user | |
| image.img_user | |
| ipblocks.ipb_user | |
| ipblocks.ipb_by | |
| logging.log_user | |
| oldimage.oi_user | |
| protected_titles.pt_user | |
| recentchanges.rc_user | |
| revision.rev_user | |
| uploadstash.us_user | |
| user_former_groups.ufg_user | |
| user_groups.ug_user | |
| user_newtalk.user_id | |
| user_properties.up_user | |
| watchlist.wl_user | |
| watchlist.wl_id | watchlist_expiry.we_item | 
Extensions used on Wikimedia wikis
| Primary key | Storage elsewhere | 
|---|---|
| actor.actor_id | cu_changes.cuc_actor | 
| cu_log.cul_actor | |
| archive.ar_id | N/A | 
| category.cat_id | N/A | 
| comment.comment_id | cu_changes.cuc_comment_id | 
| externallinks.el_id | N/A | 
| filearchive.fa_id | N/A | 
| ipblocks.ipb_id | N/A | 
| job.job_id | N/A | 
| page.page_id | titlekey.tk_page | 
| cu_changes.cuc_page_id | |
| page_restrictions.pr_id | N/A | 
| recentchanges.rc_id | N/A | 
| revision.rev_id | abuse_filter_log.afl_rev_id | 
| sites.site_id | N/A | 
| site_stats.ss_row_id | N/A | 
| text.old_id | N/A | 
| user.user_id | abuse_filter.af_user | 
| abuse_filter_history.afh_user | |
| abuse_filter_log.afl_user | |
| cu_changes.cuc_user | |
| cu_log.cul_user | 
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.