Page MenuHomePhabricator

Add numeric primary key to wbqc_constraints table
Closed, ResolvedPublic

Description

Currently, the PRIMARY KEY of the wbqc_constraints table (found on wikis with the WikibaseQualityConstraints extension installed: wikidatawiki and testwikidatawiki) is the constraint_guid, which is a Wikibase statement ID: a forty-something character string like P580$F2A0326E-4245-4D26-A63F-DD700B6B7DDD. @Ladsgroup has kindly informed me that this is not ideal :) if we want to join the table against anything else (which we will want to do for T180582 – see this comment for details: feedback is welcome there too!), we should instead have an auto-incrementing integer as the primary key. (And then I assume there should be an index on the constraint_guid, just like we currently have one on the pid.)

Event Timeline

Change 392458 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add constraint_id column to wbqc_constraints table

https://gerrit.wikimedia.org/r/392458

Change 392458 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add constraint_id column to wbqc_constraints table

https://gerrit.wikimedia.org/r/392458

Change 416924 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Fix path to SQL script

https://gerrit.wikimedia.org/r/416924

Change 416924 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Fix path to SQL script

https://gerrit.wikimedia.org/r/416924

Lucas_Werkmeister_WMDE claimed this task.

Done except for applying the schema change in production, for which we have a separate task.

Change 456607 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Make index on constraint_guid unique

https://gerrit.wikimedia.org/r/456607

Change 456607 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Make index on constraint_guid unique

https://gerrit.wikimedia.org/r/456607