Imrpove migrations
This commit is contained in:
1 parent
f386499d2f
commit
4f28a59c7e
7 files changed
+187
-88
No files matched your search
@@ -42,6 +42,12 @@ abort "Opération annulée." unless %w[o oui].include?(
|
||||
console.gets&.strip&.downcase
|
||||
)
|
||||
|
||||
verified_status_id = DB[:account_statuses]
|
||||
.where(name: "Verified")
|
||||
.get(:id)
|
||||
|
||||
abort "Statut Verified introuvable." unless verified_status_id
|
||||
|
||||
auth = Rodauth.lib do
|
||||
db DB
|
||||
enable :create_account
|
||||
@@ -57,6 +63,10 @@ DB.transaction do
|
||||
|
||||
account_id = auth.account_id_for_login(login: email)
|
||||
|
||||
DB[:accounts]
|
||||
.where(id: account_id)
|
||||
.update(status_id: verified_status_id)
|
||||
|
||||
DB[:members].insert(
|
||||
account_id: account_id,
|
||||
kind: "individual",
|
||||
|
||||
Reference in new issue
Block a user