summaryrefslogtreecommitdiff
path: root/db/migrate/20181106135939_add_index_to_deployments.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-11-07 21:59:52 +0900
committerShinya Maeda <shinya@gitlab.com>2018-11-07 21:59:52 +0900
commit90df732144263d058039a3846d9fe4420816efe1 (patch)
treebe3e76e01c732924d0eba99a152316abcf3ffd10 /db/migrate/20181106135939_add_index_to_deployments.rb
parent9b807a1091d7939e0b5206d6fd76a3a034d4cda4 (diff)
downloadgitlab-ce-90df732144263d058039a3846d9fe4420816efe1.tar.gz
Remove low selective indexes
Diffstat (limited to 'db/migrate/20181106135939_add_index_to_deployments.rb')
-rw-r--r--db/migrate/20181106135939_add_index_to_deployments.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/db/migrate/20181106135939_add_index_to_deployments.rb b/db/migrate/20181106135939_add_index_to_deployments.rb
index dc9a053d21c..5f988a4723c 100644
--- a/db/migrate/20181106135939_add_index_to_deployments.rb
+++ b/db/migrate/20181106135939_add_index_to_deployments.rb
@@ -8,20 +8,10 @@ class AddIndexToDeployments < ActiveRecord::Migration
disable_ddl_transaction!
def up
- add_concurrent_index :deployments, [:project_id, :status, :id]
- add_concurrent_index :deployments, [:project_id, :status, :iid]
add_concurrent_index :deployments, [:project_id, :status, :created_at]
- add_concurrent_index :deployments, [:environment_id, :status, :id]
- add_concurrent_index :deployments, [:environment_id, :status, :iid]
- add_concurrent_index :deployments, [:environment_id, :sha]
end
def down
- remove_concurrent_index :deployments, [:project_id, :status, :id]
- remove_concurrent_index :deployments, [:project_id, :status, :iid]
remove_concurrent_index :deployments, [:project_id, :status, :created_at]
- remove_concurrent_index :deployments, [:environment_id, :status, :id]
- remove_concurrent_index :deployments, [:environment_id, :status, :iid]
- remove_concurrent_index :deployments, [:environment_id, :sha]
end
end