More indices for asscociations. related to #2159
This commit is contained in:
parent
8dec24a33c
commit
7b97e30449
2 changed files with 47 additions and 1 deletions
26
db/migrate/20121203160507_more_indices.rb
Normal file
26
db/migrate/20121203160507_more_indices.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
class MoreIndices < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :notes, :project_id
|
||||
add_index :namespaces, :owner_id
|
||||
add_index :keys, :user_id
|
||||
|
||||
add_index :projects, :namespace_id
|
||||
add_index :projects, :owner_id
|
||||
|
||||
add_index :services, :project_id
|
||||
add_index :snippets, :project_id
|
||||
|
||||
add_index :users_projects, :project_id
|
||||
|
||||
# Issues
|
||||
add_index :issues, :assignee_id
|
||||
add_index :issues, :milestone_id
|
||||
add_index :issues, :author_id
|
||||
|
||||
# Merge Requests
|
||||
add_index :merge_requests, :assignee_id
|
||||
add_index :merge_requests, :milestone_id
|
||||
add_index :merge_requests, :author_id
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue