25 lines
734 B
Ruby
25 lines
734 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateVulnerabilityFindingLinks < ActiveRecord::Migration[6.0]
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
DOWNTIME = false
|
|
|
|
disable_ddl_transaction!
|
|
|
|
def up
|
|
create_table :vulnerability_finding_links, if_not_exists: true do |t|
|
|
t.timestamps_with_timezone null: false
|
|
t.references :vulnerability_occurrence, index: { name: 'finding_links_on_vulnerability_occurrence_id' }, null: false, foreign_key: { on_delete: :cascade }
|
|
t.text :name
|
|
t.text :url, null: false
|
|
end
|
|
|
|
add_text_limit :vulnerability_finding_links, :name, 255
|
|
add_text_limit :vulnerability_finding_links, :url, 2048
|
|
end
|
|
|
|
def down
|
|
drop_table :vulnerability_finding_links
|
|
end
|
|
end
|