Page MenuHomePhabricator

[lib] Move createAsyncMigrate to utils
ClosedPublic

Authored by tomek on May 13 2024, 5:10 AM.
Tags
None
Referenced Files
F3140747: D12014.id40931.diff
Sun, Nov 3, 5:11 AM
Unknown Object (File)
Fri, Nov 1, 9:09 PM
Unknown Object (File)
Fri, Nov 1, 8:57 AM
Unknown Object (File)
Sat, Oct 12, 6:20 PM
Unknown Object (File)
Sat, Oct 12, 6:20 PM
Unknown Object (File)
Sat, Oct 12, 6:20 PM
Unknown Object (File)
Sat, Oct 12, 6:20 PM
Unknown Object (File)
Sat, Oct 12, 6:20 PM
Subscribers

Details

Summary

I need to split createAsyncMigrate function and after this refactoring it won't make sense for these to be in create-async-migrate.js - the new one should bo somewhere in utils. The original createAsyncMigrate should also be placed in utils probably from the beginning.

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

Depends on D11947

Test Plan

Flow

Diff Detail

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

Event Timeline

lib/utils/migration-utils.js
235

For some reason jest was failing on importing the DEFAULT_VERSION which was used here originally. I think we can safely use -1 here because it is tightly coupled with our migrations versions and the only constraint is for it to be lower than the version of any of them.

tomek requested review of this revision.May 13 2024, 5:26 AM
This revision is now accepted and ready to land.May 14 2024, 11:45 PM
This revision was automatically updated to reflect the committed changes.