Page MenuHomePhabricator

Remove all readers and all nontrivial writers for "accountType" and "accountDomain" on "ExternalAccount"

Authored by epriestley on Feb 22 2020, 10:29 PM.



Depends on D21018. Ref T13493. Ref T6703. The "ExternalAccount" table has a unique key on <accountType, accountDomain, accountID> but this no longer matches our model of reality and changes in this sequence end writes to accountID.

Remove this key.

Then, remove all readers of accountType and accountDomain (and all nontrivial writers) because none of these callsites are well-aligned with plans in T6703.

This change has no user-facing impact today: all the rules about linking/unlinking/etc remain unchanged, because other rules currently prevent creation of more than one provider with a given "accountType".

Test Plan
  • Linked an OAuth1 account (JIRA).
  • Linked an OAuth2 account (Asana).
  • Used bin/auth refresh to cycle OAuth tokens.
  • Grepped for affected symbols.
  • Published an Asana update.
  • Published a JIRA link.

Diff Detail

rP Phabricator
Lint OK
Unit Tests OK
Build Status
Buildable 23889
Build 32874: Run Core Tests
Build 32873: arc lint + arc unit

Event Timeline

epriestley created this revision.Feb 22 2020, 10:29 PM
Owners added a subscriber: Restricted Owners Package.Feb 22 2020, 10:29 PM
epriestley requested review of this revision.Feb 22 2020, 10:31 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 23 2020, 1:48 AM
This revision was automatically updated to reflect the committed changes.