summaryrefslogtreecommitdiff
path: root/db/migrate/20170216141440_drop_index_for_builds_project_status.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-02-16 22:19:24 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-02-20 15:57:03 +0800
commit22d6f96cf982765fa9b957905248a573c6e3c498 (patch)
treefc83bff2127ef6cfe0a12e9872a3531001446154 /db/migrate/20170216141440_drop_index_for_builds_project_status.rb
parent3750b06b8cdc02bc87eba27dd8e4ab5f1f24802f (diff)
downloadgitlab-ce-22d6f96cf982765fa9b957905248a573c6e3c498.tar.gz
Add index for ci_commits for gl_project_id, ref, status26570-optimize-latest-pipeline-query
and remove the old one which we don't really need.
Diffstat (limited to 'db/migrate/20170216141440_drop_index_for_builds_project_status.rb')
-rw-r--r--db/migrate/20170216141440_drop_index_for_builds_project_status.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20170216141440_drop_index_for_builds_project_status.rb b/db/migrate/20170216141440_drop_index_for_builds_project_status.rb
new file mode 100644
index 00000000000..906711b9f3f
--- /dev/null
+++ b/db/migrate/20170216141440_drop_index_for_builds_project_status.rb
@@ -0,0 +1,8 @@
+class DropIndexForBuildsProjectStatus < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ DOWNTIME = false
+
+ def change
+ remove_index(:ci_commits, [:gl_project_id, :status])
+ end
+end