summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-08-07 22:10:09 +0300
committerrinpatch <rinpatch@sdf.org>2020-08-10 11:56:37 +0300
commit15fa3b6bd8dcc65b74715c500cd23923251d7fd3 (patch)
treee668f0a1371697c80a1dd636dd578dc3754458f9 /priv
parenta818587467feb1f5d5ad1f9499e61dcd7184e864 (diff)
20200802170532_fix_legacy_tags: chunk the user query
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20200802170532_fix_legacy_tags.exs2
1 files changed, 1 insertions, 1 deletions
diff --git a/priv/repo/migrations/20200802170532_fix_legacy_tags.exs b/priv/repo/migrations/20200802170532_fix_legacy_tags.exs
index a84b5d0f6..ca82fac42 100644
--- 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()