Page MenuHomePhabricator

[lib] Move createAsyncMigrate to utils
ClosedPublic

Authored by tomek on May 13 2024, 5:10 AM.
Tags
None
Referenced Files
F3515104: D12014.id40949.diff
Sun, Dec 22, 7:30 AM
F3515077: D12014.id40931.diff
Sun, Dec 22, 7:24 AM
F3514756: D12014.id40228.diff
Sun, Dec 22, 6:26 AM
F3514751: D12014.id40109.diff
Sun, Dec 22, 6:25 AM
F3513678: D12014.diff
Sun, Dec 22, 1:28 AM
Unknown Object (File)
Fri, Dec 20, 5:50 PM
Unknown Object (File)
Wed, Dec 4, 7:09 PM
Unknown Object (File)
Nov 11 2024, 8:43 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/utils/migration-utils.js
235 ↗(On Diff #40109)

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.