Rs-migrate simple data migration library

I made a simple helper utility to assist with simple data migrations within an RS app, property name changes/type changes etc.

If anyone has a similar use case, you’re welcome to try it out. I’ve currently only really used it for a few specific needs, so it’s possible it could be improved to cover more use-cases I didn’t think of. Feedback and suggestions welcome.

2 Likes

Nice to see an attempt at this :+1:t4:

Something I’ve never been clear about is whether it’s safe to migrate after sync finishes: like is it possible the client gets sync-done but some other changes haven’t come in yet? I’m not so experienced that it’s obvious what happens there. And I mean in general, not just in relation to this tool.

In rs.js 2.0 (and its beta versions), sync-done emits an object with a completed boolean property.

If you have full caching enabled for a path, then all new, changed, and removed documents at or below the level of that folder will have been synced successfully when completed is true/truthy.

1 Like