debian-mirror-gitlab/db/migrate/20220726154013_add_component_id_to_sbom_occurrences.rb
2022-08-27 11:52:29 +05:30

18 lines
491 B
Ruby

# 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