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)
Mon, Jul 22, 11:24 AM
Unknown Object (File)
Sat, Jul 13, 9:17 PM
Unknown Object (File)
Sat, Jul 13, 6:32 PM
Unknown Object (File)
Sat, Jul 13, 1:36 AM
Unknown Object (File)
Fri, Jul 12, 11:57 PM
Unknown Object (File)
Fri, Jul 12, 5:18 PM
Unknown Object (File)
Fri, Jul 12, 5:09 PM
Unknown Object (File)
Thu, Jul 11, 11:41 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.