20180917171038_create_vulnerability_scanners.rb 510 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# frozen_string_literal: true

class CreateVulnerabilityScanners < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def change
    create_table :vulnerability_scanners, id: :bigserial do |t|
      t.timestamps_with_timezone null: false

      t.references :project, null: false, foreign_key: { on_delete: :cascade }

      t.string :external_id, null: false
      t.string :name, null: false

      t.index [:project_id, :external_id], unique: true
    end
  end
end