How to deal with overriding saved preferences? #2508
-
I have the following fictional scenario. For the collection "media" I have these
A couple of users fiddle around with the overview and decide they don't want the
How can I make the all users see the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There isn't a "single press of a button" option for this, but you could update your preferences collection to do it fairly easily. Here is an aggregation that will handle your fictional scenario changes for you:
|
Beta Was this translation helpful? Give feedback.
Aggregations are a mongoDB way to chain commands together. In this case I'm just finding and updating one collection. This would be a one time update to data in the database coinciding with your config changes.
It is typical of other frameworks to have migrations for changing schema and modifying data to an existing database. We are kicking off migrations and additional database support work this week.
For now you can do it from a script or database tool like MongoDB Compass.