Skip to content

activity_log Table size #759

Answered by Gummibeer
njames asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

is your issue only about the size the table requires on the disk? Or do you have any performance issues on runtime?

The package provides a command to delete all activities older than x days.
https://docs.spatie.be/laravel-activitylog/v3/basic-usage/cleaning-up-the-log/
If you need all logs forever but not in the database you could also adjust this command to export the activities in question as CSV and send via email or put in a storage before deleting.
You could use https://github.com/spatie/simple-excel to do this.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Gummibeer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants