Guides

Prune Old Activities in Waypoint

An audit log grows with every save. Prune old activities regularly so queries stay fast and you don't keep personal data longer than you need to.

Schedule the command

php
// routes/console.php
use Illuminate\Support\Facades\Schedule;

Schedule::command('waypoint:prune')->dailyAt('03:00');

Keep some events longer

Set a retention period per event, e.g. to keep deletions for ten years:

php
'retention' => [
    'default' => 365,
    'deleted' => 3650,
],

Important

Check the retention rules of your industry before you set the periods. Pruned activities are deleted permanently.

Last updated: