Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 12:09:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 12:09:48 +0300
commit3f3e4bcc50a3280d03299c2c263eafd9c8e3bd7b (patch)
treeeccfc6b87b404f2871cc795bf2f7223a7e391939 /db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb
parent65a1175e466105fca1f40cb5a995fdb100ff334e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb')
-rw-r--r--db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb b/db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb
new file mode 100644
index 00000000000..b88f938d1c2
--- /dev/null
+++ b/db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddIndexOnUserIdAndCreatedAtToCiPipelines < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :ci_pipelines, [:user_id, :created_at]
+ remove_concurrent_index :ci_pipelines, [:user_id]
+ end
+
+ def down
+ add_concurrent_index :ci_pipelines, [:user_id]
+ remove_concurrent_index :ci_pipelines, [:user_id, :created_at]
+ end
+end