Page MenuHomePhabricator

[native] Run backup migrations
Changes PlannedPublic

Authored by tomek on May 13 2024, 6:19 AM.
Tags
None
Referenced Files
F3513001: D12016.id40935.diff
Sat, Dec 21, 9:31 PM
F3513000: D12016.id40287.diff
Sat, Dec 21, 9:31 PM
F3512999: D12016.id40887.diff
Sat, Dec 21, 9:31 PM
F3512998: D12016.id40119.diff
Sat, Dec 21, 9:31 PM
F3512987: D12016.id.diff
Sat, Dec 21, 9:31 PM
F3512981: D12016.diff
Sat, Dec 21, 9:30 PM
Unknown Object (File)
Wed, Dec 4, 7:09 PM
Unknown Object (File)
Nov 18 2024, 6:48 PM
Subscribers

Details

Reviewers
kamil
marcin
varun
Summary

Run the Redux migrations using the default state and a restored SQLite. We run these only because they are modifying the SQLIte and we don't care about the Redux state that was transformed - we're using the default state and throw away the result.

https://linear.app/comm/issue/ENG-7009/run-redux-migrations-after-the-backup-is-restored

Depends on D12050

Test Plan

Create a backup, kill the app, add a new migration, open the app, restore the backup and check if the migration was run - by calling commCoreModule.getStoredVersion() before and after the migrations.

Diff Detail

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

Event Timeline

native/backup/use-client-backup.js
110–114

We will need to keep a versioned default state so that after the default state is changed, we can run older migrations.

tomek requested review of this revision.May 13 2024, 6:36 AM
This revision is now accepted and ready to land.May 14 2024, 11:48 PM
native/backup/use-client-backup.js
125 ↗(On Diff #40887)

Is this console.info accidentally left over?

native/backup/use-client-backup.js
125 ↗(On Diff #40887)

No, it was intentional. In this hook, we have a couple of console logs, so I added this one to keep it consistent.

tomek planned changes to this revision.Oct 2 2024, 3:18 AM