BigW Consortium Gitlab

20121203160507_more_indices.rb 637 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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