mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 03:17:51 +00:00
20200802170532_fix_legacy_tags: chunk the user query
This commit is contained in:
parent
a818587467
commit
15fa3b6bd8
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ defmodule Pleroma.Repo.Migrations.FixLegacyTags do
|
||||||
where: fragment("? && ?", u.tags, ^legacy_tags),
|
where: fragment("? && ?", u.tags, ^legacy_tags),
|
||||||
select: struct(u, [:tags, :id])
|
select: struct(u, [:tags, :id])
|
||||||
)
|
)
|
||||||
|> Repo.all()
|
|> Repo.chunk_stream(100)
|
||||||
|> Enum.each(fn user ->
|
|> Enum.each(fn user ->
|
||||||
fix_tags_changeset(user)
|
fix_tags_changeset(user)
|
||||||
|> Repo.update()
|
|> Repo.update()
|
||||||
|
|
Loading…
Reference in a new issue