debian-mirror-gitlab/db/post_migrate/20200704143633_add_index_on_user_id_and_created_at_where_source_to_ci_pipelines.rb
2020-08-09 17:44:08 +05:30

18 lines
415 B
Ruby

# frozen_string_literal: true
class AddIndexOnUserIdAndCreatedAtWhereSourceToCiPipelines < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :ci_pipelines, [:user_id, :created_at, :config_source]
end
def down
remove_concurrent_index :ci_pipelines, [:user_id, :created_at, :config_source]
end
end