file extensions are hard

This commit is contained in:
Your New SJW Waifu 2021-02-05 08:54:08 -06:00
parent 9fd39458eb
commit ac2ea66589
1 changed files with 21 additions and 0 deletions

21
fix_users.esx Normal file
View File

@ -0,0 +1,21 @@
alias Pleroma.{User,Repo}
import Ecto.Query
import Ecto.Changeset
from(
u in User,
where: fragment("? ->> 'id' IS NULL", u.info),
update: [
set: [info: nil]
]
) |> Repo.update_all([])
User
|> where([user], fragment("? ->> 'id' IS NULL", user.info))
|> Repo.all()
|> Enum.each(fn user ->
change(user)
|> put_embed(:info, %User.Info{locked: true, hide_followers: true, hide_follows: true})
|> User.update_and_set_cache()
end)