blob: c667dce511fd2135bfbad5f2768686b03cf63027 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# frozen_string_literal: true
class AddUniqueJobIdFilteTypePartitionIdIndexToCiJobArtifact < Gitlab::Database::Migration[2.2]
milestone '16.7'
TABLE_NAME = :ci_job_artifacts
INDEX_NAME = :idx_ci_job_artifacts_on_job_id_file_type_and_partition_id_uniq
COLUMNS = %i[job_id file_type partition_id]
def up
prepare_async_index(TABLE_NAME, COLUMNS, unique: true, name: INDEX_NAME)
end
def down
unprepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
end
end
|