Page MenuHomePhabricator

Add primary key and drop unique index on swsource_links on wmf wikis
Closed, ResolvedPublic

Description

Apply T312276 to wmf wikis

  1. ALTERs to run: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CreditsSource/+/817885/2/schema/mysql/patch-swsource_links-unique-to-pk.sql
  2. Where to run those changes: wikivoyage.dblist
  3. When to run those changes: any time
  4. If the schema change is backwards compatible: Yes
  5. If the schema change has been tested already on some of the test/beta wikis: beta already running with the new schema
  6. if the data should be made available on the labs replicas and/or dumps: no change of the existing rules

Due to a bug in the schema change generator (T314138) the DROP + ALTER should be rewritten to be atomic:

alter table swsource_links drop key swsl_work_source_unique, ADD  PRIMARY KEY (swsl_workid, swsl_sourceid);

s3:

bnwikivoyage
dewikivoyage
elwikivoyage
eswikivoyage
fawikivoyage
fiwikivoyage
frwikivoyage
hewikivoyage
hiwikivoyage
itwikivoyage
nlwikivoyage
plwikivoyage
pswikivoyage
ptwikivoyage
rowikivoyage
ruwikivoyage
svwikivoyage
ukwikivoyage
viwikivoyage
zhwikivoyage

s5:

enwikivoyage
eowikivoyage
jawikivoyage
shnwikivoyage
trwikivoyage

Event Timeline

According to T326156: Fix CreditsSource drifts there is already a schema drift, and the alter may not apply cleanly, the old index could named swsource_links_swsl_workid_key on some wikis

Marostegui triaged this task as Medium priority.
Marostegui moved this task from Triage to Ready on the DBA board.

Mentioned in SAL (#wikimedia-operations) [2023-01-04T14:37:31Z] <marostegui> dbmaint deploy schema change on s5 eqiad T326223

Mentioned in SAL (#wikimedia-operations) [2023-01-04T14:38:22Z] <marostegui> dbmaint deploy schema change on s3 eqiad T326223

This is done. dewikivoyage and itwikivoyage had this key: swsource_links_swsl_workid_key