Open
Description
- Start writing
gh_id
,gh_access_token
,gh_login
,gh_avatar
to both theusers
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 withdeprecated_
to allow for easy rollback; deploy and monitor. - When satisfied that nothing is using the deprecated fields, write another migration removing the fields entirely.