From: rinpatch Date: Fri, 7 Aug 2020 19:10:09 +0000 (+0300) Subject: 20200802170532_fix_legacy_tags: chunk the user query X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=15fa3b6bd8dcc65b74715c500cd23923251d7fd3;p=akkoma 20200802170532_fix_legacy_tags: chunk the user query --- 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()