-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema versioning pattern with Cosmos DB #23753
Comments
I found a solution myself. For intercept reading I replace CosmosClientWrapper in DbContext and override ExecuteSqlQueryAsync method. For intercept writing I override SaveChangesAsync in DbContext. Due to the bug that HasValueGenerator does not affect Update despite of configuring together with ValueGeneratedOnAddOrUpdate I have to set values for modified entities in SaveChangesAsync. |
I'm faced with the same problem at the moment ... schema versioning. I would love to see this feature added to EF Core for Cosmos DB. |
Please upvote issues in this repo (thumbs up on top-most message) to indicate that you want it implemented. |
I’d love to see built-in support for this as well |
I tried to add a property and it works fine locally, but failed when I deployed to azure... |
See #21006 for having a default value when reading missing properties, specifically for the (very common) scenario of adding a new property with existing documents. |
Hello,
I would like to implement the schema versioning pattern with for EF Core Cosmos DB.
I do not care about missing properties in queries and indexes and just want to have a full backward compatibility with old versions and avoid service downtime.
So the idea was to add a shadow property "schema_version" to each entity and and to migrate the data if necessary during reading.
Questions:
Thank you.
The text was updated successfully, but these errors were encountered: