Remove toggle_confirmation; require explicit state change
Also cosmetic changes to make the code clearer
This commit is contained in:
parent
d36182c088
commit
2c0fe2ea9e
11 changed files with 37 additions and 41 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue