debian-mirror-gitlab/db/migrate/20210707151536_create_vulnerability_finding_evidence_sources.rb

27 lines
715 B
Ruby
Raw Normal View History

2021-09-30 23:02:18 +05:30
# frozen_string_literal: true
class CreateVulnerabilityFindingEvidenceSources < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
create_table_with_constraints :vulnerability_finding_evidence_sources do |t|
t.timestamps_with_timezone null: false
t.references :vulnerability_finding_evidence, index: { name: 'finding_evidence_sources_on_finding_evidence_id' }, null: false, foreign_key: { on_delete: :cascade }
t.text :name
t.text :url
t.text_limit :name, 2048
t.text_limit :url, 2048
end
end
def down
with_lock_retries do
drop_table :vulnerability_finding_evidence_sources
end
end
end