HomePhabricator
Diffusion Comm 1ec1670833cf

[native] Create table and queries for DMOperations

Description

[native] Create table and queries for DMOperations

Summary:
Create a table where the operations are stored and allow quick query by the operation type.

https://linear.app/comm/issue/ENG-10333/create-sqlite-table-and-queries

Test Plan:
Tested the whole stack on both native and web:

  1. Run the app on Redux version 86 with a modification to processDMOperation making all the INBOUND messages unsupported
  2. On one platform created a thread and sent a text message. These were visible on the sender, and invisible on the recipient
  3. Closed the recipient and added a migration that unshimms the thread creation operations, e.g.
unshimDMOperations(
  state,
  dmOperationTypes.CREATE_THREAD,
  handleReduxMigrationFailure,
): MigrationFunction<WebNavInfo, AppState>),
  1. Run the recipient and noticed the thread appearing
  2. Added another migration, this time unshimming text messages
  3. Run the recipient and noticed messages appearing

Additionally, tested the migration on native by removing the table from the code that creates the DB, bumping the version to make sure that the migration is run, and adding some code in JS that queries the table.

Reviewers: kamil, bartek

Reviewed By: kamil

Subscribers: ashoat

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

Details

Provenance
tomekAuthored on Tue, Mar 11, 5:25 AM
Reviewer
kamil
Differential Revision
D14447: [native] Create table and queries for DMOperations
Parents
rCOMMd8cd93d28714: [terraform] Bump staging Identity to 0.51.2
Branches
Loading...
Tags
Loading...