diff options
| author | winter | 2025-01-15 23:16:53 +0000 |
|---|---|---|
| committer | winter | 2025-01-15 23:16:53 +0000 |
| commit | e3a0248c3b1762abf5138fbd1b8228601006d44d (patch) | |
| tree | 21f44e10765aef2b8132094a7900faff12f33903 /bin/cleandb | |
| parent | 75b3778dccccddb5cc90b2b4e0a3f958826ad8ba (diff) | |
tidy up old timeline entries after 6 months
Diffstat (limited to 'bin/cleandb')
| -rwxr-xr-x | bin/cleandb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/cleandb b/bin/cleandb index 94873bf..b33f994 100755 --- a/bin/cleandb +++ b/bin/cleandb @@ -6,8 +6,14 @@ require __DIR__ . '/../vendor/autoload.php'; $db = Digitigrade\Db::getInstance()->getPdo(); $db->beginTransaction(); $db->exec(<<<END + +-- permanently delete anything marked for deletion DELETE FROM actor WHERE deleted = true; DELETE FROM note WHERE deleted = true; DELETE FROM interaction WHERE deleted = true; + +-- remove old timeline items +DELETE FROM home_timeline_item WHERE modified < (current_timestamp - interval '6 months'); + END); $db->commit();
\ No newline at end of file |
