What is an efficient approach to maintaining data history for models in Sails? For instance, how do we maintain the data if a user updates the database and we'd like to keep versions for reverting the data as it updates.
I've seen numerous examples of using a "changes" tag that keeps the date as a sub-tag. Is this the most efficient?
On model update we can copy previous information. Are there any better suggestions or links with examples?
{
text:"This is the latest paragraph",
changes:{
text:{
"1470685677694":"This was the paragraph",
"1470685577694":"This was the original paragraph"
}
}
}
I am hoping to find a good solution to find / search and optimize this data to allow the user to revert if necessary.