HomePhorge

Add a unique key to OwnersPath on "<packageID, repositoryPHID, pathIndex>"

Description

Add a unique key to OwnersPath on "<packageID, repositoryPHID, pathIndex>"

Summary:
Depends on D19181. Ref T11015. This nukes duplicates from the table if they exist, then adds a unique key.

(Duplicates should not exist and can not be added with any recent version of the web UI.)

Test Plan:

  • Tried to add duplicates with web UI, didn't have any luck.
  • Explicitly added duplicates with manual INSERTs.
  • Viewed packages in web UI and saw duplicates.
  • Ran migrations, got a clean purge and a nice unique key.
  • There's still no way to actually hit a duplicate key error in the UI (unless you can collide hashes, I suppose), this is purely a correctness/robustness change.

Maniphest Tasks: T11015

Differential Revision: https://secure.phabricator.com/D19182

Details

Provenance
epriestleyAuthored on Mar 6 2018, 7:42 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP1bf4422c749c: Add and populate a `pathIndex` column for OwnersPath
Branches
Unknown
Tags
Unknown

Event Timeline