Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring to disentangle account creation from only one identity provider #10611

Open
5 tasks
carols10cents opened this issue Feb 18, 2025 · 0 comments
Open
5 tasks
Assignees
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Comments

@carols10cents
Copy link
Member

  • Start writing gh_id, gh_access_token, gh_login, gh_avatar to both the users table and a new table with more generic names that also has a column indicating the OAuth provider that is the source of the values (which will always be set to GitHub for now. Deploy and manually verify values are written/updated as expected, but otherwise don't use the values in the new table.
  • Write a script to backfill the new table with data from all existing records as appropriate. Do an offline test with a production database dump to know how long it will take the script to run and what the load on the database will be like. If necessary, batch updates done by the script to minimize production app impacts.
  • Change all code that uses the users table's gh_id, gh_access_token, gh_login, gh_avatar fields to instead use the new table.
  • In a migration, rename the users table's gh_id, gh_access_token, gh_login, gh_avatar columns to start with deprecated_ to allow for easy rollback; deploy and monitor.
  • When satisfied that nothing is using the deprecated fields, write another migration removing the fields entirely.
@carols10cents carols10cents self-assigned this Feb 18, 2025
@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

No branches or pull requests

2 participants