FIX: Add index on user_api_keys.key_hash (#9387)
This commit is contained in:
parent
84f344c5d1
commit
b64b590cfb
|
@ -116,5 +116,6 @@ end
|
|||
#
|
||||
# index_user_api_keys_on_client_id (client_id) UNIQUE
|
||||
# index_user_api_keys_on_key (key) UNIQUE
|
||||
# index_user_api_keys_on_key_hash (key_hash) UNIQUE
|
||||
# index_user_api_keys_on_user_id (user_id)
|
||||
#
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddIndexToUserApiKeyOnKeyHash < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_index :user_api_keys, :key_hash, unique: true
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue