Reputation: 21
I'm setting a auditing system for our application. The tables grow very fast. So I wonder, if there is a mechanism to clean up snapshots and commits after a period of time, for example all snapshots older than 30 days. If it is not possible, could you please suggest other approaches? Thanks.
Upvotes: 2
Views: 1033
Reputation: 29
Clean up can be done in the following order:
Note : You can put the filter clause as per your need which is not considered in the above DB Script.
Upvotes: 1
Reputation: 13571
I don't think that Javers provides you any mechanism to delete/update existing commits/snapshots, however you can create your own stored database household procedure and call it by some cron scheduled job. Basically you need only to filter out all JV_COMMIT
entries by date (older than 30 days), then by commit
id you can find properties and snapshots, then by snapshot you will find global ids, and just remove them in such order
global id -> snapshot -> commit properties -> commit
Upvotes: 1