blob: e2b91bf87113befb7329fc401a359ee0c2eb3e0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
class AddCiJobArtifactsFileFinalPathIndexSynchronously < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
INDEX_NAME = 'index_ci_job_artifacts_on_file_final_path'
WHERE_CLAUSE = 'file_final_path IS NOT NULL'
def up
add_concurrent_index :ci_job_artifacts, :file_final_path, name: INDEX_NAME, where: WHERE_CLAUSE
end
def down
remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
end
end
|