projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5be9d13
)
Update lib/mix/tasks/pleroma/database.ex
author
feld
<feld@feld.me>
Mon, 7 Jun 2021 20:02:28 +0000
(20:02 +0000)
committer
feld
<feld@feld.me>
Mon, 7 Jun 2021 20:02:28 +0000
(20:02 +0000)
lib/mix/tasks/pleroma/database.ex
patch
|
blob
|
history
diff --git
a/lib/mix/tasks/pleroma/database.ex
b/lib/mix/tasks/pleroma/database.ex
index bcde07774fb71b9365bec0bdc75169ebc4196aa6..57f73d12baa0bc70e6a11e243358a9c66aeec14e 100644
(file)
--- a/
lib/mix/tasks/pleroma/database.ex
+++ b/
lib/mix/tasks/pleroma/database.ex
@@
-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)