summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-08-11 15:13:29 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-08-11 15:13:29 +0300
commit2def3cbf417075146da5e54201e9b969e6aa3eca (patch)
tree93cdf149a1874f56d2808598f8aeee15e60c8a10 /priv
parent56ddf20208657487bf0298409cf91b11dac346ff (diff)
parent686002164a5ab63ccb22cff015faf87f8f7fc9ec (diff)
downloadpleroma-2def3cbf417075146da5e54201e9b969e6aa3eca.tar.gz
pleroma-2def3cbf417075146da5e54201e9b969e6aa3eca.zip
Merge remote-tracking branch 'remotes/origin/develop' into 2168-media-preview-proxy
# Conflicts: # config/config.exs # mix.lock
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20200802170532_fix_legacy_tags.exs7
1 files changed, 5 insertions, 2 deletions
diff --git a/priv/repo/migrations/20200802170532_fix_legacy_tags.exs b/priv/repo/migrations/20200802170532_fix_legacy_tags.exs
index f7274b44e..ca82fac42 100644
--- a/priv/repo/migrations/20200802170532_fix_legacy_tags.exs
+++ b/priv/repo/migrations/20200802170532_fix_legacy_tags.exs
@@ -18,8 +18,11 @@ defmodule Pleroma.Repo.Migrations.FixLegacyTags do
def change do
legacy_tags = Map.keys(@old_new_map)
- from(u in User, where: fragment("? && ?", u.tags, ^legacy_tags))
- |> Repo.all()
+ from(u in User,
+ where: fragment("? && ?", u.tags, ^legacy_tags),
+ select: struct(u, [:tags, :id])
+ )
+ |> Repo.chunk_stream(100)
|> Enum.each(fn user ->
fix_tags_changeset(user)
|> Repo.update()