VentureCraft / revisionable

Easily create a revision history for any laravel model
http://twitter.com/duellsy
MIT License
2.55k stars 348 forks source link

Consider storing only attributes that have been changed and only the diff values #426

Closed e200 closed 1 year ago

e200 commented 1 year ago

Could we consider storing only the diffs between the previous and the current attribute instead of a full copy of the data to reduce storage usage?

This way, in case you want to revert, you would need to loop over all the past to compile the differences to get the content of the revision you want, and will save a lot of storage. This can have a huge impact for attributes containing big texts and small changes.

We could also store only the atributes that have been changed.

Kaylakaze commented 1 year ago

... that's already how it works.