Page MenuHomePhabricator

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

Authored by epriestley on Mar 7 2018, 3:47 AM.
Tags
None
Referenced Files
F19367915: D19182.diff
Fri, Dec 26, 2:18 PM
F19263979: D19182.diff
Mon, Dec 22, 6:39 PM
F18881342: D19182.id.diff
Nov 6 2025, 9:15 PM
F18875833: D19182.diff
Nov 5 2025, 7:41 PM
F18835519: D19182.id45949.diff
Oct 26 2025, 4:33 PM
F18833773: D19182.diff
Oct 26 2025, 5:42 AM
F18784480: D19182.id45944.diff
Oct 13 2025, 12:39 PM
F18742796: D19182.id.diff
Oct 2 2025, 9:22 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable