Well, I saw some plugins to create a version table to track changes on specific models, but can't do as easily as quora shows
What I have so far is this:
- identifier
- item_type : indicates which version of the model applies: "Theme"
- item_id
- event : if it was: "edited, added, canceled, deleted"
- who : who triggered the event
- column . Which column in the subject line has changed. "Topic.photo_url"
- new : new value: http: //s3.amazonaws.../pic.png "
- old old value: " http: //s3.amazonaws.../oldpic.png "
- revision_rel : indicates a previous revision
- Time stamp
Can anyone give me some help and recommendations with this design? I'm worried about performance, wrong columns, missing columns, etc.
id | item_type | item_id | event | who | column | new | old | revision_rel | date ________________________________________________________________________________________________________ 1 | Topic | 2 | edit | Luccas | photo | pic.png | oldpic.png | null | m:d:y 2 | Topic | 2 | revert | Chris | photo | oldpic.png | pic.png | 1 | m:d:y
source share