Creating this task to specifically discuss how we should proceed to be able to merge: https://gerrit.wikimedia.org/r/#/c/370190/1 (we are coming from: T172485#3500757 and T17441#3500739
To sum up, we, DBAs, have finished converting UNIQUE into PRIMARY keys and we would like this to be reflected on tables.sql so future wikis are created with the same PKs that we have deployed in core.
I have been chatting with @Reedy and we thought it was better to discuss here rather than hijack other tasks as this is specifically for mediawiki core.
The statements we have used to alter the affected tables are:
```
ALTER TABLE /*_*/categorylinks add primarydrop key (cl_from,cl_to), drop add primary key (cl_from;,cl_to);
ALTER TABLE /*_*/templatelinks add primary key (tl_from,tl_namespace,tl_title);
ALTER TABLE /*_*/pagelinks add primary key (pl_from,pl_namespace,pl_title);
ALTER TABLE /*_*/text drop key old_id, add primary key (old_id);
ALTER TABLE /*_*/imagelinks drop key il_from, add primary key (il_from,il_to);
ALTER TABLE /*_*/iwlinks drop key iwl_from, add primary key (iwl_from,iwl_prefix,iwl_title);
ALTER TABLE /*_*/langlinks drop key ll_from, add primary key (ll_from,ll_lang);
ALTER TABLE /*_*/log_search drop key ls_field_val, add primary key (ls_field,ls_value,ls_log_id);
ALTER TABLE /*_*/module_deps drop key md_module_skin, add primary key (md_module,md_skin);
ALTER TABLE /*_*/objectcache drop key keyname, add primary key (keyname);
ALTER TABLE /*_*/querycache_info drop key qci_type, add primary key (qci_type);
ALTER TABLE /*_*/site_stats drop key ss_row_id, add primary key (ss_row_id);
ALTER TABLE /*_*/transcache drop key tc_url_idx, add primary key (tc_url);
ALTER TABLE /*_*/user_former_groups drop key ufg_user_group, add primary key (ufg_user,ufg_group);
ALTER TABLE /*_*/user_properties drop key user_properties_user_property, add primary key (up_user,up_property);
```
If someone more experienced with mediawiki core and its patches and deployment can help here, it would be great.
Thanks