blob: 973cacaec5b370677cc0f1f44d868a080fe9f66b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class AddUniqueIndexToSbomSourcesOnSourceTypeAndSource < Gitlab::Database::Migration[2.0]
INDEX_NAME = 'index_sbom_sources_on_source_type_and_source'
disable_ddl_transaction!
def up
add_concurrent_index :sbom_sources, [:source_type, :source], unique: true, name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :sbom_sources, name: INDEX_NAME
end
end
|