diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-02-05 19:52:06 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-02-05 19:52:06 +0000 |
commit | 572fb0be9b1d45437b7c0ed1000399657f471ec7 (patch) | |
tree | 6f90e99a0d203b4cababa669d7b86440b254626c /db/migrate | |
parent | 4d11903dcf818342c4bde1af198eac7a45460318 (diff) | |
parent | 1e97a6df24f66f70811fdd4b1412432e40ab8ebe (diff) | |
download | gitlab-ce-572fb0be9b1d45437b7c0ed1000399657f471ec7.tar.gz |
Merge branch 'sh-add-index-for-label-count' into 'master'
Add index to labels for `type` and project_id`
Closes #27676
See merge request !8978
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb b/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb new file mode 100644 index 00000000000..8f944930807 --- /dev/null +++ b/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb @@ -0,0 +1,11 @@ +class AddIndexToLabelsForTypeAndProject < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def change + add_concurrent_index :labels, [:type, :project_id] + end +end |