We need to update our Mongo serializer to support extra elements and ignore extra elements for information on how to deal with the serializer exceptions on missing or extra field mappings.
Renamed
When a member has been renamed, it will exist in old documents with the old name and in new documents with the new name. The way to handle incremental upgrades for this rename would be to implement an ExtraElements member in conjunction with ISupportInitialize.
Type of member is changed
If the .NET type is compatible with the old type (an integer is changed to a double), then everything will continue to work. Otherwise, a custom serializer or a migration script will be required.
Investigate these changes, and, if possible, find a way to determine if we need to apply these in a CI pipeline so that updates get caught.
When the MongoDB schema changes, we need to take upgrades into consideration.
There are a few scenarios:
See this document for more.
Removed members
We need to update our Mongo serializer to support extra elements and ignore extra elements for information on how to deal with the serializer exceptions on missing or extra field mappings.
Renamed
When a member has been renamed, it will exist in old documents with the old name and in new documents with the new name. The way to handle incremental upgrades for this rename would be to implement an ExtraElements member in conjunction with ISupportInitialize.
Type of member is changed
If the .NET type is compatible with the old type (an integer is changed to a double), then everything will continue to work. Otherwise, a custom serializer or a migration script will be required.
Investigate these changes, and, if possible, find a way to determine if we need to apply these in a CI pipeline so that updates get caught.