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

20231205092529_drop_unique_index_job_id_file_type_to_ci_job_artifact.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: df52f76e1c45c4c6e5762d09b43e6e1c49111154 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class DropUniqueIndexJobIdFileTypeToCiJobArtifact < Gitlab::Database::Migration[2.2]
  milestone '16.7'
  disable_ddl_transaction!
  TABLE_NAME = :ci_job_artifacts
  INDEX_NAME = :index_ci_job_artifacts_on_job_id_and_file_type

  def up
    remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
  end

  def down
    add_concurrent_index(TABLE_NAME, %i[job_id file_type], unique: true, name: INDEX_NAME)
  end
end