Browse Source

file extensions are really hard

upgrade-val
Your New SJW Waifu 2 years ago
parent
commit
29bf78b7b5
  1. 21
      fix_users.ex
  2. 0
      fix_users.exs

21
fix_users.ex

@ -1,21 +0,0 @@
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)

0
fix_users.esx → fix_users.exs

Loading…
Cancel
Save