Update hashtag prune to account for followed hashtags
This commit is contained in:
parent
f101886709
commit
893d9ce93a
1 changed files with 4 additions and 1 deletions
|
@ -346,7 +346,10 @@ def run(["prune_objects" | args]) do
|
||||||
DELETE FROM hashtags AS ht
|
DELETE FROM hashtags AS ht
|
||||||
WHERE NOT EXISTS (
|
WHERE NOT EXISTS (
|
||||||
SELECT 1 FROM hashtags_objects hto
|
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!()
|
|> Repo.query!()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue