all repos — honk @ 49cec2769b40988abbc57e9e646feb8ef4a788bb

my fork of honk

delete old muted threads from db
Ted Unangst tedu@tedunangst.com
Sun, 28 Jul 2019 18:42:21 -0400
commit

49cec2769b40988abbc57e9e646feb8ef4a788bb

parent

c63a6770d029d85a8aa0b78edf1a8ca6ef8abd94

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M honk.gohonk.go

@@ -1528,6 +1528,9 @@ doordie(db, "delete from donks where honkid in (select honkid from honks where dt < ? and whofore = 0 and convoy not in (select convoy from honks where whofore = 2 or whofore = 3))", expdate)

doordie(db, "delete from honks where dt < ? and whofore = 0 and convoy not in (select convoy from honks where whofore = 2 or whofore = 3)", expdate) } doordie(db, "delete from files where fileid not in (select fileid from donks)") + for _, u := range allusers() { + doordie(db, "delete from zonkers where userid = ? and wherefore = 'zonvoy' and zonkerid < (select zonkerid from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 1 offset 200)", u.UserID, u.UserID) + } } var stmtHonkers, stmtDubbers, stmtSaveHonker, stmtUpdateFlavor, stmtUpdateCombos *sql.Stmt