summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-03 18:11:47 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-03 18:11:47 +0200
commit7b97e3044988e41e65e8186f2dadf87e5837b101 (patch)
treed0867500a80a96b4637ec42883032c29bc2b8356 /db/migrate
parent8dec24a33ca35cbd9daa6ba38df4fe1e1f9eb2ee (diff)
downloadgitlab-ce-7b97e3044988e41e65e8186f2dadf87e5837b101.tar.gz
More indices for asscociations. related to #2159
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20121203160507_more_indices.rb26
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