HomePhabricator
Diffusion Comm 34c957e249a3

[CommCoreModule] add table for message store threads

Tags
None
Referenced Files
F490679: image.png
Apr 21 2023, 2:22 AM
File Not Attached
F490680: image.png
Apr 21 2023, 2:22 AM
File Not Attached
F490678: image.png
Apr 21 2023, 2:22 AM
File Not Attached
F490677: image.png
Apr 21 2023, 2:22 AM
File Not Attached
Subscribers
None

Description

[CommCoreModule] add table for message store threads

Summary:
This code introduces new table for threads part of messages store. Skipping messageIDs as it can be computed based on message table.

start_reached will be represented as integer 1 and 0 (but will be sent as string from js code according to the current convention)

last_navigated_to and last_pruned are typed as BIGINT, SQLite`s concept of "type affinity" allows us to use INTEGER here but I believe BIGINT might make it clear to someone reading the code that this can not be stored in int. There are both approaches in the codebase so I chose the one I think is better

I think we will be querying based only on id so an additional index will not be needed.

Test Plan:
Tested migration for existing clients:

image.png (89×875 px, 54 KB)

image.png (299×917 px, 52 KB)

Tested creating a new database for fresh install:

image.png (82×614 px, 32 KB)

image.png (228×889 px, 41 KB)

Reviewers: tomek, marcin

Reviewed By: tomek

Subscribers: ashoat, atul

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

Details

Provenance
kamilAuthored on Apr 14 2023, 3:09 AM
Reviewer
tomek
Differential Revision
D7468: [CommCoreModule] add table for message store threads
Parents
rCOMM5938924b6f42: [native] Use CommUtilsModule for encrypted media
Branches
Unknown
Tags
Unknown