Page MenuHomePhabricator

[lib] Move createAsyncMigrate to utils
AcceptedPublic

Authored by tomek on Mon, May 13, 5:10 AM.
Tags
None
Referenced Files
F1786973: D12014.id40109.diff
Sat, May 18, 6:30 PM
Unknown Object (File)
Fri, May 17, 6:18 AM
Unknown Object (File)
Fri, May 17, 3:32 AM
Unknown Object (File)
Mon, May 13, 6:39 AM
Unknown Object (File)
Mon, May 13, 6:39 AM
Unknown Object (File)
Mon, May 13, 6:39 AM
Subscribers

Details

Reviewers
kamil
marcin
varun
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 D12013

Test Plan

Flow

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

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.Mon, May 13, 5:26 AM
This revision is now accepted and ready to land.Tue, May 14, 11:45 PM