Merge branch 'develop' into fix/activity-expirations-again

This commit is contained in:
Mark Felder 2020-08-10 11:32:24 -05:00
commit 024b7ce0b7
25 changed files with 51 additions and 151 deletions

View file

@ -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()