From 15fa3b6bd8dcc65b74715c500cd23923251d7fd3 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 7 Aug 2020 22:10:09 +0300 Subject: [PATCH] 20200802170532_fix_legacy_tags: chunk the user query --- priv/repo/migrations/20200802170532_fix_legacy_tags.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.45.2