mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2025-01-03 05:06:15 +01:00
file extensions are really hard
This commit is contained in:
parent
ac2ea66589
commit
29bf78b7b5
21
fix_users.ex
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)
|
Loading…
Reference in New Issue
Block a user