Page MenuHomePhabricator

Translate table `revtag` lacks a primary key
Closed, ResolvedPublic

Description

current table
CREATE TABLE /*$wgDBprefix*/revtag (
  rt_type varbinary(60) NOT NULL,

  -- Link to page.page_id
  rt_page int NOT NULL,

  -- Link to revision.rev_id
  rt_revision int NOT NULL,

  rt_value blob NULL
) /*$wgDBTableOptions*/;
-- Index for finding all revisions in a page with a given tag
CREATE UNIQUE INDEX /*i*/rt_type_page_revision ON /*$wgDBprefix*/revtag
(rt_type, rt_page, rt_revision);
-- Index for finding the tags on a given revision
CREATE INDEX /*i*/rt_revision_type ON /*$wgDBprefix*/revtag (rt_revision, rt_type);

The unique index should be converted to a primary key.
There are currently 2 direct references to the index in calls to Database::replace: https://codesearch.wmflabs.org/search/?q=rt_type_page_revision&i=nope&files=&repos=

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 817892 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Translate@master] schema: Convert Unique Index to Primary Key on revtag

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

Change 817892 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] schema: Convert Unique Index to Primary Key on revtag

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