diff options
Diffstat (limited to 'db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb')
-rw-r--r-- | db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb b/db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb new file mode 100644 index 00000000000..d1ee9c49d30 --- /dev/null +++ b/db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexToCiPipelineProjectIdCreatedAt < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_pipelines, [:project_id, :created_at] + end + + def down + remove_concurrent_index :ci_pipelines, [:project_id, :created_at] + end +end |