Ash Paper Trail, destroy action
I would like to know how to remove the versions of an object that I deleted.
I have used a destroy action on a parent object. this parent object has a version system in place with the following configuration:
I would like to be able to delete all the related versions in the "paper-trail" table, related to the row/object that I want to destroy.
when using reference_source? true, I fail to destroy my row. now it destroy my row, but I have new row in my version, every time I am destroying an object (since I do not have the )
Regards,
Angy
3 Replies
You can use the version mixin to configure the reference from the versions table to the source table in the Postgres section
Search for "mixin" in paper trail, and "references" in ash_Postgres
@AngyL75 i've marked the answer on the card for this issue: you can check out cascade_destroy: it's in the latest book update! 🙂
proposed solution for long-term: https://github.com/ash-project/ash_paper_trail/issues/177
GitHub
Support for on_delete: :delete_all · Issue #177 · ash-project/ash...
Is your feature request related to a problem? Please describe. I didn't find a simple way to modify the on_delete behaviour for postgres, so I generated a migration and manually changed the beh...