diff options
Diffstat (limited to 'db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb')
-rw-r--r-- | db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb b/db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb new file mode 100644 index 00000000000..7dbf6f25ab4 --- /dev/null +++ b/db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class IndexSbomOccurrencesOnUuid < Gitlab::Database::Migration[2.1] + INDEX_NAME = 'index_sbom_occurrences_on_uuid' + + disable_ddl_transaction! + + def up + add_concurrent_index :sbom_occurrences, :uuid, unique: true, name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :sbom_occurrences, name: INDEX_NAME + end +end |