debian-mirror-gitlab/db/post_migrate/20211207081708_add_index_ci_job_artifacts_project_id_file_type.rb
2022-03-02 08:16:31 +05:30

16 lines
408 B
Ruby

# frozen_string_literal: true
class AddIndexCiJobArtifactsProjectIdFileType < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
INDEX_NAME = 'index_ci_job_artifacts_on_id_project_id_and_file_type'
def up
add_concurrent_index :ci_job_artifacts, [:project_id, :file_type, :id], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
end
end