Page MenuHomePhabricator

[services][identity] create a struct for the users table in MySQL
ClosedPublic

Authored by varun on Oct 20 2022, 12:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 26, 10:39 AM
Unknown Object (File)
Thu, Dec 26, 10:39 AM
Unknown Object (File)
Thu, Dec 26, 10:39 AM
Unknown Object (File)
Thu, Dec 26, 10:38 AM
Unknown Object (File)
Nov 26 2024, 5:31 AM
Unknown Object (File)
Nov 24 2024, 10:59 PM
Unknown Object (File)
Nov 24 2024, 10:59 PM
Unknown Object (File)
Nov 24 2024, 10:59 PM

Details

Summary

this struct will store the data we need to move from the users table in MySQL to DynamoDB. we are omitting the password hash since we're not storing passwords on the Identity service, avatar since it's unused currently, and public_key since keys will be per-device.

Adding @ashoat on these DB-related diffs since he has a lot of context

Test Plan

cargo build (this is dead code so it can't break anything)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat added a subscriber: derek.

Heads-up to other reviewers... things like public_key, social_proof, and device_id will be stored per-device on a separate devices table. @derek is doing the same thing on the keyserver side right now... in fact, he's removing some columns from users and making other columns optional, while adding columns to the cookies table (which corresponds to devices on the identity service / DDB side)

services/identity/src/populate_db.rs
1 ↗(On Diff #17750)

I generally find myself always needing a debug version, so that I can do logging. But probably not an issue if we only use something like their username or id for logging.

The struct looks reasonable to me, but I don't have a ton of context here

This revision is now accepted and ready to land.Oct 24 2022, 9:05 AM
services/identity/src/populate_db.rs
1 ↗(On Diff #17750)

I usually add the derive traits when I actually need them. gonna leave this out for now