seppevs/migrate-mongo

Split a collection into two collection

kasir-barati opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Split a collection into two collections. Assume we have an articles collection, Now we wanna split it into posts and tags. and I wanna update the article documents too.

Describe the solution you'd like
I can provide the source schema (mongoose schema) and target schemas (mongoose schemas). and then specify which source.field converted to which target.field. and the documents moved to the new collections automatically.

Describe alternatives you've considered
The alternative way is a script that connects to the database and does what I want.

Now after one month I know that my previous comment is not possible, at least in my opinion