Update hashtag prune to account for followed hashtags #844

Open
norm wants to merge 2 commits from norm/akkoma:hashtag-prune into develop
Showing only changes of commit 40da4e88ea - Show all commits

View file

@ -346,7 +346,10 @@ def run(["prune_objects" | args]) do
DELETE FROM hashtags AS ht
WHERE NOT EXISTS (
SELECT 1 FROM hashtags_objects hto
WHERE ht.id = hto.hashtag_id)
WHERE ht.id = hto.hashtag_id
UNION
SELECT 1 FROM user_follows_hashtag ufht
WHERE ht.id = ufht.hashtag_id)
"""
|> Repo.query!()