Clean Database UserActivity

This commit is contained in:
skywalker 2024-12-02 10:59:51 +08:00
parent e97853c2cc
commit 6a98aa6396

View File

@ -29,10 +29,9 @@ Use the following command to clear the activity records:
```
use seahub_db;
DELETE FROM Activity WHERE to_days(now()) - to_days(timestamp) > 90;
DELETE FROM UserActivity WHERE to_days(now()) - to_days(timestamp) > 90;
```
The corresponding items in UserActivity will deleted automatically by MariaDB when the foreign keys in Activity table are deleted.
### Login
Use the following command to clean the login records: