For any changes to database model we will have to write automated scripts that will upgrade the old data model to the new one. For example, if we add a new required schema like - inventoryContainerType: Joi.string().valid('outlet', 'warehouse').required() to the inventory collection, then we will have to update all existing documents with the mentioned property.
For any changes to database model we will have to write automated scripts that will upgrade the old data model to the new one. For example, if we add a new required schema like -
inventoryContainerType: Joi.string().valid('outlet', 'warehouse').required()
to theinventory
collection, then we will have to update all existing documents with the mentioned property.