Page MenuHomePhabricator

Add primary key for database table securepoll_lists
Open, Needs TriagePublic

Description

The table securepoll_lists does not have a primary key or a unique index.

Please add a primary key as best practice by choosing one or more relevant columns which must be unique by functional, tables.json contains a fixme which suggest splists_name to become unique

Current schema
CREATE TABLE /*_*/securepoll_lists (
  li_name VARBINARY(255) DEFAULT NULL,
  li_member INT NOT NULL,
  INDEX splists_name (li_name, li_member),
  INDEX splists_member (li_member, li_name)
) /*$wgDBTableOptions*/;

Primary key helps on database maintenance and it can make deletions on the table easier and avoid deadlocks with other deletion or inserts

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.