Remove toggle_confirmation; require explicit state change

Also cosmetic changes to make the code clearer
This commit is contained in:
Mark Felder 2020-10-13 16:07:36 -05:00 committed by Mark Felder
commit 2c0fe2ea9e
11 changed files with 37 additions and 41 deletions

View file

@ -11,9 +11,9 @@ defmodule Pleroma.Repo.Migrations.ConfirmLoggedInUsers do
def up do
User
|> where([u], u.confirmation_pending == true)
|> where([u], u.is_confirmed == false)
|> join(:inner, [u], t in Token, on: t.user_id == u.id)
|> Repo.update_all(set: [confirmation_pending: false])
|> Repo.update_all(set: [is_confirmed: true])
end
def down do