Page MenuHomePhabricator

[lib] Move createAsyncMigrate to utils
ClosedPublic

Authored by tomek on May 13 2024, 5:10 AM.
Tags
None
Referenced Files
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
Unknown Object (File)
Nov 11 2024, 5:14 PM
Unknown Object (File)
Nov 11 2024, 4:58 PM
Unknown Object (File)
Nov 11 2024, 4:56 PM
Unknown Object (File)
Nov 3 2024, 10:36 AM
Unknown Object (File)
Nov 3 2024, 5:32 AM
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.