diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-03 18:11:47 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-03 18:11:47 +0200 |
commit | 7b97e3044988e41e65e8186f2dadf87e5837b101 (patch) | |
tree | d0867500a80a96b4637ec42883032c29bc2b8356 /db/migrate | |
parent | 8dec24a33ca35cbd9daa6ba38df4fe1e1f9eb2ee (diff) | |
download | gitlab-ce-7b97e3044988e41e65e8186f2dadf87e5837b101.tar.gz |
More indices for asscociations. related to #2159
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20121203160507_more_indices.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/db/migrate/20121203160507_more_indices.rb b/db/migrate/20121203160507_more_indices.rb new file mode 100644 index 00000000000..52170a7c597 --- /dev/null +++ b/db/migrate/20121203160507_more_indices.rb @@ -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 |