dwyl / mvp

📲 simplest version of the @dwyl app
https://mvp.fly.dev
GNU General Public License v2.0
87 stars 2 forks source link

Feat: Add `PaperTrail` to MVP to enable `item.text` History! #252

Closed nelsonic closed 1 year ago

nelsonic commented 1 year ago

The outcome of our PaperTrail learning [SPIKE] was successful: https://github.com/dwyl/phoenix-papertrail-demo We need to outline how we are going to apply it to the MVP so that we can capture versions of item.text so that there is a full history of the changes made to the item. 👍

Todo

@LuchoTurtle given that you have the most knowledge in the team of this, please:

Don't worry, not asking you to implement the UI/UX for this, yet ... just the backend! 👌

LuchoTurtle commented 1 year ago

With the introduction of Papertrail, the DB won't suffer many changes: only one table is going to be added to track item changes. So the items, items_tags, people, tags and timers table won't suffer any changes.

A new table will be introduced instead: versions (we perhaps we could change it to changes or something you find more idiomatic). This table will be used to track changes to the items table (for now) but can be extended for other tables as well. It will reference the people table to track who made the change.

nelsonic commented 1 year ago

versions is fine as the table name. We can change it later if needed. 👍 (thanks!)