this post was submitted on 19 Jul 2023
80 points (96.5% liked)

main

1456 readers
1 users here now

Default community for midwest.social. Post questions about the instance or questions you want to ask other users here.

founded 4 years ago
MODERATORS
 

Deleted something I shouldn't have. I learned my lesson, but I had to revert to a backup that was about 3 days old. My bad.

you are viewing a single comment's thread
view the rest of the comments
[–] seahorse@midwest.social 2 points 2 years ago (2 children)

Do you know where I can find the query to do that? Databases are not my forte.

[–] Wander@yiffit.net 4 points 2 years ago* (last edited 2 years ago)

Yes, let me logging to my server and try to retrieve the exact query I used. BRB

[–] SmokeInFog@midwest.social 1 points 2 years ago

W3 Schools entry on SQL DELETE statement

I don't know the actual table definitions for lemmy, but it should look something like:

DELETE FROM activitypub
WHERE createdDate < ((SELECT CURRENT_DATE) - interval '2 weeks')