Skip to content

Instantly share code, notes, and snippets.

View juherr's full-sized avatar

Julien Herr juherr

View GitHub Profile
@juherr
juherr / directus-cleaning.sql
Last active December 19, 2023 13:57 — forked from Tummerhore/directus-cleaning.sql
Directus (MySQL): Remove old activities, revisions, flow logs, notifications
/*
DISCLAIMER: Use at your own risk!
Tested with Directus 10.8.0 and MySQL 5.6
This will delete all flow execution logs, revisions and acitivites which are older
than the specified MinTimestamp and are not in the top <specified MinItems> latest
items. Activities related to saved revisions / flow logs are also saved even when
they normally would have been deleted.
Archived notifiactions are deleted when the creation of the notifaction is older