mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Update lib/mix/tasks/pleroma/database.ex
This commit is contained in:
parent
5be9d13981
commit
bc51dea425
1 changed files with 4 additions and 4 deletions
|
@ -97,10 +97,10 @@ defmodule Mix.Tasks.Pleroma.Database do
|
|||
|> Repo.delete_all(timeout: :infinity)
|
||||
|
||||
prune_hashtags_query = """
|
||||
delete from hashtags as ht
|
||||
where not exists (
|
||||
select 1 from hashtags_objects hto
|
||||
where ht.id = hto.hashtag_id)
|
||||
DELETE FROM hashtags AS ht
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM hashtags_objects hto
|
||||
WHERE ht.id = hto.hashtag_id)
|
||||
"""
|
||||
|
||||
Repo.query(prune_hashtags_query)
|
||||
|
|
Loading…
Reference in a new issue