Jump to content

Manual:Primary key storage in other fields

From mediawiki.org

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

[edit]

Core

[edit]
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 (removed in 1.40)
archive.ar_comment_id
ipblocks.ipb_reason_id
image.img_description_id
image_comment_temp.imgcomment_description_id (removed in 1.31)
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 (removed in 1.31)
ip_changes.ipc_rev_id N/A
ipblocks.ipb_id ipblocks.ipb_parent_block_id
job.job_id N/A
linktarget.lt_id pagelinks.pl_target_id
logging.log_id change_tag.ct_log_id
log_search.ls_log_id
recentchanges.rc_logid
tag_summary.ts_log_id (removed in 1.33)
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 (removed in 1.33)
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 (removed in 1.40)
tag_summary.ts_rev_id (removed in 1.33)
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 (removed in 1.35)
revision.rev_text_id (removed in 1.35)
user.user_id archive.ar_user (removed in 1.34)
filearchive.fa_deleted_user (removed in 1.34)
filearchive.fa_user (removed in 1.34)
image.img_user (removed in 1.34)
ipblocks.ipb_user
ipblocks.ipb_by (removed in 1.34)
logging.log_user (removed in 1.34)
oldimage.oi_user (removed in 1.34)
protected_titles.pt_user
recentchanges.rc_user (removed in 1.34)
revision.rev_user (removed in 1.35)
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

[edit]
Primary key Storage elsewhere
actor.actor_id cu_changes.cuc_actor
cu_log_event.cule_actor
cu_private_event.cupe_actor
cu_log.cul_actor
discussiontools_items.it_actor
archive.ar_id N/A
category.cat_id N/A
comment.comment_id cu_changes.cuc_comment_id
cu_private_event.cupe_comment_id
cu_log.cul_reason_id
cu_log.cul_reason_plaintext_id
content.content_id N/A
externallinks.el_id N/A
filearchive.fa_id N/A
image.img_name N/A
ip_changes.ipc_rev_id N/A
ipblocks.ipb_id N/A
job.job_id N/A
linktarget.lt_id N/A
logging.log_id cu_log_event.cule_log_id
page.page_id titlekey.tk_page
cu_changes.cuc_page_id
cu_private_event.cupe_page
echo_event.event_page_id
echo_target_page.etp_page
flaggedpages.fp_page_id
flaggedpage_pending.fpp_page_id
flaggedrevs.fr_page_id
flaggedpage_config.fpc_page_id
pr_index.pr_page_id
translate_sections.trs_page
revtag.rt_page
translate_reviews.trr_page
translate_translatable_bundles.ttb_page_id
wikispeech_utterance.wsu_page_id
page_restrictions.pr_id N/A
recentchanges.rc_id N/A
revision.rev_id abuse_filter_log.afl_rev_id
cu_changes.cuc_this_oldid
cu_changes.cuc_last_oldid
revsrc.revsrc_id
flaggedrevs.fr_rev_id
revtag.rt_revision
translate_reviews.trr_revision
sites.site_id N/A
site_stats.ss_row_id N/A
slot_roles.role_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 (removed in 1.39)
cu_log.cul_user
cu_log.cul_target_id
echo_notification.notification_user
echo_email_batch.eeb_user_id
flaggedrevs.fr_user
flaggedrevs_promote.frp_user_id
loginnotify_seen_net.lsn_user
securepoll_lists.li_member
securepoll_elections.el_owner
securepoll_strike.st_user
watchlist.wl_id N/A