Hello, new meteor developer with a question on keeping track of data changes.
I’m building a personal (not online) application for organization and note taking, kind of like a combination of Evernote, wiki, and todo lists.
I’d like to be able to keep a historical record of my notes, so I can roll them back to any point in time, perhaps as a daily snapshot. It doesn’t need to be particularly fast or efficient, as I’d use it sporadically.
What would be the best way to integrate this feature into the app?
There 3 easy options and a few more difficult, but as you said you don’t need it to be particularly fast or efficient, we’re fine with these 3.
Just create new document in your collection with an ID reference to the original one (this is usually valid for least complex apps)
Create an archive/history array in your document, where you paste new objects once the main document gets edited.
Create separate archive/history collection where you paste new documents every time your main document gets rewritten, with an ID reference (one main collection would have one archive collection).
With 2, just be sure to exclude the history from the publications.