The CheckUser tables (cu_changes and cu_log) have several drifts in production. One of these (due to 'cuc_private') caused T321041 due to the flawed understanding that it existed on all production wikis as there existed no task for rolling out the field to all wikis. The drift tracker was run and is visible on https://drift-tracker.toolforge.org/report/checkuser/.
Drifts that are currently listed at toolforge:
- 'cu_changes.cuc_private' only db1104 - ideally needs to be on all wikis
- 'cuc_actor_ip_time' index on 'cu_changes' only db1160 and db1104 - should be on all wikis
- 'cu_changes.cuc_timestamp' has mismatched type - should be type 'mwtimestamp' (which is BINARY(14) in this case according to mediawiki schema change docs)
- 'cu_log.cul_timestamp' has mismatched type - should be 'mwtimestamp' (same as point above for it's raw DB type)
- 'cuc_user_time' index on 'cu_changes' needs to be removed from all wikis as it's not present in the current tables.json schema for CheckUser
- 'cu_changes.cuc_agent' needs to exist on all wikis (I'm very surprised this hasn't caused a prod error)
- 'cu_log.cul_range_end' needs to exist on all wikis (I'm surprised this hasn't caused a prod error)
- 'cul_actor_time' index on table 'cu_log' needs to be on all wikis
- Columns 'cuc_user' and 'cuc_user_text', and index 'cuc_user_ip_time' need to be removed from 'cu_changes'
- Missing column 'cuc_only_for_read_old' from 'cu_changes'