HomePhabricator
Diffusion Comm 9398dd1d1134

[SQLite] add table for users

Description

[SQLite] add table for users

Summary:
Table to store data from UserStore in SQLite.

Column types are based on Flow types.

Some time ago @atul suggested to make this table key-value with data in JSON - I still think for some stores it's beneficial but here I decided to make more datailed data representation. Making key-value doesn't speed things up that much, and I think at some point we might want to have easy access to user data from C++/Rust (for example avatar to show more detailed notif).

EDIT: actually that was a bad assumption, avatar can have multiple types which force us to use JSON anyway which means we will not gain anything, and the amount of C++ code is reduced a lot, that being said proceeding with a simple key-value table.

Depends on D9902

Test Plan:

  1. Make sure migration works
  2. Logout and make sure creating database form scratch
  3. Test on both web (it's visible in worker's logs) and native.

Reviewers: tomek

Reviewed By: tomek

Subscribers: ashoat, atul

Differential Revision: https://phab.comm.dev/D9903

Details

Provenance
kamilAuthored on Nov 3 2023, 3:28 AM
Reviewer
tomek
Differential Revision
D9903: [SQLite] add table for users
Parents
rCOMM68f415b94431: [lib] update `reduceUserInfos` to return ops
Branches
Unknown
Tags
Unknown