We're updating the issue view to help you get more done. 

Provide a consistent way to delete audited data permanently

Description

I'm looking for a consistent way to remove Envers historical data from the DB, i.e. using the Envers API, but I failed. The only way I found is to write low level DML queries against the audit tables, but this approach leads to the severe risk of Envers metadata consistence damage, with umpredictable consequences.

Do you wonder why we might need such a feature? There are contexts when it would be useful, or even required, to provide a way to remove historical data permanently, either after a given expiration, or upon user request (for example when the right to be forgotten, or other legal issues, apply). I know that it's possible to exclude selectively the auditing through the @NotAudited annotation and the like, but I think that it's a reasonable requirement to have a default scenario with an entity audited, but the option to erase the audited data of a given entity (identified by its identifier) when required.

Environment

None

Status

Assignee

Chris Cranford

Reporter

Giulio Quaresima

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Minor