diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-11 09:09:48 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-11 09:09:48 +0000 |
commit | 3f3e4bcc50a3280d03299c2c263eafd9c8e3bd7b (patch) | |
tree | eccfc6b87b404f2871cc795bf2f7223a7e391939 /db/migrate | |
parent | 65a1175e466105fca1f40cb5a995fdb100ff334e (diff) | |
download | gitlab-ce-3f3e4bcc50a3280d03299c2c263eafd9c8e3bd7b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb | 19 |
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 |