24 lines
645 B
Ruby
24 lines
645 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddVendorToVulnerabilityScanners < ActiveRecord::Migration[6.0]
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
DOWNTIME = false
|
|
DEFAULT_SCANNER_VENDOR = 'GitLab'
|
|
|
|
# rubocop:disable Migration/AddLimitToTextColumns
|
|
# limit is added in 20200622070620_add_limit_to_vulnerability_scanners_vendor
|
|
def up
|
|
with_lock_retries do
|
|
add_column :vulnerability_scanners, :vendor, :text, default: DEFAULT_SCANNER_VENDOR, null: false
|
|
end
|
|
end
|
|
|
|
def down
|
|
with_lock_retries do
|
|
remove_column :vulnerability_scanners, :vendor
|
|
end
|
|
end
|
|
# rubocop:enable Migration/AddLimitToTextColumns
|
|
end
|