mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
Allow users to update their email address (#1745)
* Change email address * Email confirmation * Email change test * Lint * Schema reset * Set test email sender * Select specific user fixture * Refactor/cleanup * Remove unused email_confirmation_token * Current user would never be true * Fix translation test failures
This commit is contained in:
parent
46e86a9a11
commit
41873de11d
28 changed files with 225 additions and 15 deletions
|
@ -0,0 +1,9 @@
|
|||
class AddEmailConfirmationToUsers < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :users, :unconfirmed_email, :string
|
||||
add_column :users, :email_confirmation_token, :string
|
||||
add_column :users, :email_confirmation_sent_at, :datetime
|
||||
|
||||
add_index :users, :email_confirmation_token, unique: true
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class RemoveEmailConfirmationSentAtFromUsers < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_column :users, :email_confirmation_sent_at, :datetime
|
||||
end
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
class RemoveEmailConfirmationTokenFromUsers < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_index :users, :email_confirmation_token
|
||||
remove_column :users, :email_confirmation_token, :string
|
||||
end
|
||||
end
|
3
db/schema.rb
generated
3
db/schema.rb
generated
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_01_28_203303) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_01_31_171943) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
|
@ -661,6 +661,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_01_28_203303) do
|
|||
t.string "role", default: "member", null: false
|
||||
t.boolean "active", default: true, null: false
|
||||
t.datetime "onboarded_at"
|
||||
t.string "unconfirmed_email"
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
t.index ["family_id"], name: "index_users_on_family_id"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue