Update all existing documents with a sequence number

Hello Mongo guys,

We’re looking into moving from PostgreSQL to MongoDB and so we’re testing some use-cases we absolutely need on Mongo, and we’re stuck on one of them: the update of all documents of one collection (>30MB if data in test environment) with a sequence.

Say we have a collection already filled with 100k documents, we want to complete each document with a new field, say “myNumber”, populated with : “1” + “$store” + “<sequenceNumber>” , $store being a field at the root in each document and sequenceNumber being a incremented value attached to the store (ex.: 1022000001, store = 22, sequenceNumber = 1), this value needs to be unique.
I’ve taken a look at this page regarding auto-increment fields but I can’t work out a way to apply an update to existing data.
Also, one important thing is that we need to apply this update in a liquibase changeset for automation purposes.