jorasmhj / db-mongo-migration

Mongo migration Library
MIT License
7 stars 2 forks source link

How to use transactions? #55

Closed JensWinkler91 closed 3 months ago

JensWinkler91 commented 8 months ago

Is there any possibility to use transactions? I'd like to update all collections or nothing, if an error occurs.

saroj-mhj commented 8 months ago

Is there any possibility to use transactions? I'd like to update all collections or nothing, if an error occurs.

@JensWinkler91 Transaction is used by default, if your migration fails midway the migrations won't be committed at all.

JensWinkler91 commented 3 months ago

Sorry for the late reply and thanks for your response!