This is the WMF prod task for T198811: Convert UNIQUE indexes to Primary Keys in MW Core Tables
interwiki, page_props, protected_titles, site_identifiers have had UNIQUE indexes swapped for PK. interwiki should be empty. site_identifiers should be small
The other two, likely a lot bigger.
ALTER TABLE /*_*/interwiki DROP KEY /*i*/iw_prefix, ADD PRIMARY KEY (iw_prefix); ALTER TABLE /*_*/page_props DROP KEY /*i*/pp_page_propname, ADD PRIMARY KEY (pp_page,pp_propname); ALTER TABLE /*_*/protected_titles DROP KEY /*i*/pt_namespace_title, ADD PRIMARY KEY (pt_namespace,pt_title); ALTER TABLE /*_*/site_identifiers DROP KEY /*i*/site_ids_type, ADD PRIMARY KEY (si_type,si_key);
Schema change progress:
- s1
- codfw
- eqiad progress T199368#4468701
- s2
- codfw
- eqiad progress T199368#4437193
- s3
- codfw
- eqiad progress T199368#4475664
- s4
- codfw
- eqiad progress T199368#4446887
- s5
- codfw T199368#4426319
- eqiad progress T199368#4426319
- s6
- codfw
- eqiad progress T199368#4429726
- s7
- codfw
- eqiad progress T199368#4450276
- s8
- codfw
- eqiad progress T199368#4461468
- wikitech
- labswiki
- labtestwiki