PERF: Add unique index oauth2_user_infos(user_id, provider) (#8230)
This commit is contained in:
parent
1a72a61822
commit
09a569aaba
|
@ -20,5 +20,6 @@ end
|
|||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_oauth2_user_infos_on_uid_and_provider (uid,provider) UNIQUE
|
||||
# index_oauth2_user_infos_on_uid_and_provider (uid,provider) UNIQUE
|
||||
# index_oauth2_user_infos_on_user_id_and_provider (user_id,provider) UNIQUE
|
||||
#
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddIndexToOauth2UserInfo < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_index :oauth2_user_infos, [:user_id, :provider], unique: true
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue