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

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

class AddComponentIdToSbomOccurrences < Gitlab::Database::Migration[2.0]
  enable_lock_retries!

  def up
    # Code using this table has not been implemented yet.
    # The migration prior to this one ensures that it is empty.
    # rubocop:disable Rails/NotNullColumn
    add_column :sbom_occurrences, :component_id, :bigint, null: false
    # rubocop:enable Rails/NotNullColumn
  end

  def down
    remove_column :sbom_occurrences, :component_id
  end
end