summaryrefslogtreecommitdiff
path: root/db/migrate/20230106184809_create_dast_profiles_tags.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20230106184809_create_dast_profiles_tags.rb')
-rw-r--r--db/migrate/20230106184809_create_dast_profiles_tags.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20230106184809_create_dast_profiles_tags.rb b/db/migrate/20230106184809_create_dast_profiles_tags.rb
new file mode 100644
index 00000000000..f31eaea5fa8
--- /dev/null
+++ b/db/migrate/20230106184809_create_dast_profiles_tags.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class CreateDastProfilesTags < Gitlab::Database::Migration[2.1]
+ def up
+ create_table :dast_profiles_tags do |t|
+ t.references :dast_profile, null: false, foreign_key: { on_delete: :cascade },
+ index: { name: 'i_dast_profiles_tags_on_scanner_profiles_id' }
+
+ t.bigint :tag_id, null: false
+
+ t.index :tag_id, name: :index_dast_profiles_tags_on_tag_id
+ end
+ end
+
+ def down
+ drop_table :dast_profiles_tags
+ end
+end