Commit bc51dea4 authored by feld's avatar feld
Browse files

Update lib/mix/tasks/pleroma/database.ex

parent 5be9d139
...@@ -97,10 +97,10 @@ def run(["prune_objects" | args]) do ...@@ -97,10 +97,10 @@ def run(["prune_objects" | args]) do
|> Repo.delete_all(timeout: :infinity) |> Repo.delete_all(timeout: :infinity)
prune_hashtags_query = """ prune_hashtags_query = """
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)
""" """
Repo.query(prune_hashtags_query) Repo.query(prune_hashtags_query)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment