Page MenuHomePhabricator

[native] Set the DB version after registration
AcceptedPublic

Authored by tomek on Wed, May 8, 6:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 17, 7:02 PM
Unknown Object (File)
Fri, May 17, 11:21 AM
Unknown Object (File)
Mon, May 13, 1:18 PM
Unknown Object (File)
Sun, May 12, 12:53 AM
Unknown Object (File)
Sat, May 11, 4:00 PM
Unknown Object (File)
Fri, May 10, 4:22 AM
Unknown Object (File)
Fri, May 10, 4:21 AM
Unknown Object (File)
Fri, May 10, 4:20 AM
Subscribers

Details

Reviewers
kamil
marcin
inka
Summary

When a new account is created, we have to store the version in the DB so that it is included in a backup.
We don't need to set the version when a user logs in, because we can assume that eventually, we will restore the data from a backup - and that includes the version.

https://linear.app/comm/issue/ENG-7006/back-up-redux-version

Depends on D11937

Test Plan

Register a new user and check if the version is present in Redux and in the DB.

Diff Detail

Repository
rCOMM Comm
Branch
transactions
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Wed, May 8, 7:16 AM
tomek planned changes to this revision.Wed, May 8, 9:03 AM
tomek requested review of this revision.Wed, May 8, 9:08 AM

I planned changes because I thought there was an issue with the current users - they are already registered, so we won't put the version into the DB for them and their backup won't contain it. Actually, there's no such problem, because in order to create a backup, the app should be run, and the migration from the previous diff will be performed and will put the version into the DB.

Can you test a scenario where the migration is run on a logged out screen, and then the user logs in? Can you verify that the db has the correct version set in this case?

Can you test both SIWE and password?

This revision is now accepted and ready to land.Tue, May 14, 11:15 PM