H
H
Hanry6542020-07-02 20:07:46
MongoDB
Hanry654, 2020-07-02 20:07:46

Is it possible to keep models in sync in mongodb?

For example, if I add/remove a field, did it delete/add a field from all existing documents when performing synchronization?

UPD: I'm
using the mongoose library

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
cython, 2020-07-02
@Hanry654

If the standard mongodb driver:
https://docs.mongodb.com/manual/reference/method/d...
If you use something like mongoose, then look towards the migration libraries:
https://www.npmjs. com/package/migrate-mongoose

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question