Page MenuHomePhabricator

[native] Run backup migrations
Changes PlannedPublic

Authored by tomek on May 13 2024, 6:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 7:09 PM
Unknown Object (File)
Nov 18 2024, 6:48 PM
Unknown Object (File)
Nov 18 2024, 6:36 PM
Unknown Object (File)
Nov 18 2024, 6:26 PM
Unknown Object (File)
Nov 18 2024, 6:18 PM
Unknown Object (File)
Nov 18 2024, 4:44 PM
Unknown Object (File)
Nov 9 2024, 2:57 PM
Unknown Object (File)
Oct 12 2024, 6:04 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
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

native/backup/use-client-backup.js
110–114 ↗(On Diff #40119)

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