izelnakri / paper_trail

Track and record all the changes in your database with Ecto. Revert back to anytime in history.
https://hex.pm/packages/paper_trail
MIT License
565 stars 92 forks source link

Models with the same aliased name are pulling each others version history #219

Open thenick775 opened 1 year ago

thenick775 commented 1 year ago

This is more of a question, but I'm running into a case where we have 2 models, say:

Both of these are showing up in the versions table as item_type: "Category", and if the id's are the same, they pull each other's version history.

Is there a way to use the fully qualified name in the item_type column of the versions table, or to specify what I would like to use as the item_type?

Any assistance is appreciated!

izelnakri commented 1 year ago

This could be a good contribution/PR! if you're willing to implement it and create a PR, I'm willing to review & merge it eventually ;)