PERF: Add index on email_tokens.token_hash
This commit is contained in:
parent
4e67297a7c
commit
9a6ec1d0c6
|
@ -121,6 +121,7 @@ end
|
|||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_email_tokens_on_token (token) UNIQUE
|
||||
# index_email_tokens_on_user_id (user_id)
|
||||
# index_email_tokens_on_token (token) UNIQUE
|
||||
# index_email_tokens_on_token_hash (token_hash) UNIQUE
|
||||
# index_email_tokens_on_user_id (user_id)
|
||||
#
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateIndexOnEmailTokensTokenHash < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_index :email_tokens, :token_hash, unique: true
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue