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
Unknown Object (File)
Tue, Jun 3, 11:10 PM
Unknown Object (File)
Mon, Jun 2, 9:35 PM
Unknown Object (File)
Sun, Jun 1, 7:23 PM
Unknown Object (File)
Sat, May 31, 8:06 PM
Unknown Object (File)
Fri, May 9, 8:27 PM
Unknown Object (File)
Apr 30 2025, 7:18 PM
Unknown Object (File)
Apr 29 2025, 5:38 PM
Unknown Object (File)
Apr 5 2025, 7:46 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