mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
add uniq index for users email to ensure uniqueness (#567)
This commit is contained in:
parent
39e6d1a2af
commit
d2df5b2872
2 changed files with 7 additions and 1 deletions
|
@ -0,0 +1,5 @@
|
|||
class AddUniqIndexToUsersEmail < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_index :users, :email, unique: true
|
||||
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: 2024_03_19_154732) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_03_25_064211) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
|
@ -232,6 +232,7 @@ ActiveRecord::Schema[7.2].define(version: 2024_03_19_154732) do
|
|||
t.string "password_digest"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
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