debian-mirror-gitlab/db/migrate/20220726154012_ensure_sbom_occurrences_is_empty.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
494 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# frozen_string_literal: true
class EnsureSbomOccurrencesIsEmpty < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
# Ensure that the sbom_occurrences table is empty to ensure that the
# following migration adding a not-null column succeeds.
# The code which creates records in this table has not been implemented yet.
execute('DELETE FROM sbom_occurrences')
end
def down
# no-op
end
end