summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-11-07 15:37:05 +0900
committerShinya Maeda <shinya@gitlab.com>2018-11-07 15:37:05 +0900
commitea78c4fce651d10f1102659b75d162f42c0d0324 (patch)
tree2cc3838bb9aa5b182ce6a381dc5de6587f3e0389
parent9a0aa653e396d1fae1e22b23add18fd0d98ee753 (diff)
downloadgitlab-ce-ea78c4fce651d10f1102659b75d162f42c0d0324.tar.gz
Revert "Revert add action follow up 2"
This reverts commit 4ffc2a7111580af20a9748e39e89df840432b3cf.
-rw-r--r--db/migrate/20181106135939_add_index_to_deployments.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/db/migrate/20181106135939_add_index_to_deployments.rb b/db/migrate/20181106135939_add_index_to_deployments.rb
index 0b840999de3..999c4a9e575 100644
--- a/db/migrate/20181106135939_add_index_to_deployments.rb
+++ b/db/migrate/20181106135939_add_index_to_deployments.rb
@@ -8,6 +8,8 @@ class AddIndexToDeployments < ActiveRecord::Migration
disable_ddl_transaction!
def up
+ remove_concurrent_index :deployments, [:project_id, :status]
+ remove_concurrent_index :deployments, [:environment_id, :status]
add_concurrent_index :deployments, [:project_id, :status, :id]
add_concurrent_index :deployments, [:project_id, :status, :iid]
add_concurrent_index :deployments, [:environment_id, :status, :id]
@@ -16,6 +18,8 @@ class AddIndexToDeployments < ActiveRecord::Migration
end
def down
+ add_concurrent_index :deployments, [:project_id, :status]
+ add_concurrent_index :deployments, [:environment_id, :status]
remove_concurrent_index :deployments, [:project_id, :status, :id]
remove_concurrent_index :deployments, [:project_id, :status, :iid]
remove_concurrent_index :deployments, [:environment_id, :status, :id]