PERF: add missing index on group_users
This commit is contained in:
parent
c1ecd6f4ce
commit
287411525a
|
@ -70,4 +70,5 @@ end
|
|||
# Indexes
|
||||
#
|
||||
# index_group_users_on_group_id_and_user_id (group_id,user_id) UNIQUE
|
||||
# index_group_users_on_user_id_and_group_id (user_id,group_id) UNIQUE
|
||||
#
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddUserIdGroupIdIndexToGroupUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :group_users, [:user_id, :group_id], unique: true
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue