Cleaning up
php spark anvil:prune deletes notifications that were read more than 90
days ago, in all tenants, together with expired exports and old API log
entries. Schedule it daily:
15 3 * * * cd /var/www/app && php spark anvil:prune| Option | Effect |
|---|---|
--days 30 |
keep read notifications 30 days instead of 90 |
Unread notifications are kept. In code:
service('notifications')->prune(90); // returns the number of deleted notificationsStorage
Section titled “Storage”Table anvil_notifications (created by the migrations of Anvil), one row
per user and notification: UUID, tenant, user, type, title, body, link,
read time and timestamps. Deleting a tenant deletes its notifications.