projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a818587
)
20200802170532_fix_legacy_tags: chunk the user query
author
rinpatch
<rinpatch@sdf.org>
Fri, 7 Aug 2020 19:10:09 +0000
(22:10 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Mon, 10 Aug 2020 08:56:37 +0000
(11:56 +0300)
priv/repo/migrations/20200802170532_fix_legacy_tags.exs
patch
|
blob
|
history
diff --git
a/priv/repo/migrations/20200802170532_fix_legacy_tags.exs
b/priv/repo/migrations/20200802170532_fix_legacy_tags.exs
index a84b5d0f63793b9e5967c55318d0a026a7bfe6c1..ca82fac4299ce8e05817bffe61f353a4d28c0a35 100644
(file)
--- a/
priv/repo/migrations/20200802170532_fix_legacy_tags.exs
+++ b/
priv/repo/migrations/20200802170532_fix_legacy_tags.exs
@@
-22,7
+22,7
@@
defmodule Pleroma.Repo.Migrations.FixLegacyTags do
where: fragment("? && ?", u.tags, ^legacy_tags),
select: struct(u, [:tags, :id])
)
- |> Repo.
all(
)
+ |> Repo.
chunk_stream(100
)
|> Enum.each(fn user ->
fix_tags_changeset(user)
|> Repo.update()