summaryrefslogtreecommitdiff
path: root/db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb
blob: f07cebb6b2c70aab6e8686b85e67895af8693f93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class CreateDastScannerProfilesRunnerTags < Gitlab::Database::Migration[2.1]
  def up
    create_table :dast_scanner_profiles_tags do |t|
      t.references :dast_scanner_profile, null: false, foreign_key: { on_delete: :cascade },
                                          index: { name: 'i_dast_scanner_profiles_tags_on_scanner_profiles_id' }

      t.bigint :tag_id, null: false

      t.index :tag_id, name: :index_dast_scanner_profiles_tags_on_tag_id
    end
  end

  def down
    drop_table :dast_scanner_profiles_tags
  end
end