diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-02-16 17:19:24 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-02-20 10:57:03 +0300 |
commit | 22d6f96cf982765fa9b957905248a573c6e3c498 (patch) | |
tree | fc83bff2127ef6cfe0a12e9872a3531001446154 /db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb | |
parent | 3750b06b8cdc02bc87eba27dd8e4ab5f1f24802f (diff) |
Add index for ci_commits for gl_project_id, ref, status
and remove the old one which we don't really need.
Diffstat (limited to 'db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb')
-rw-r--r-- | db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb b/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb new file mode 100644 index 00000000000..7b1e687977b --- /dev/null +++ b/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb @@ -0,0 +1,10 @@ +class AddIndexForLatestSuccessfulPipeline < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + disable_ddl_transaction! + + def change + add_concurrent_index(:ci_commits, [:gl_project_id, :ref, :status]) + end +end |