Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /db/migrate/20210707171554_create_vulnerability_flags.rb
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'db/migrate/20210707171554_create_vulnerability_flags.rb')
-rw-r--r--db/migrate/20210707171554_create_vulnerability_flags.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/db/migrate/20210707171554_create_vulnerability_flags.rb b/db/migrate/20210707171554_create_vulnerability_flags.rb
new file mode 100644
index 00000000000..bf33963b08f
--- /dev/null
+++ b/db/migrate/20210707171554_create_vulnerability_flags.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+class CreateVulnerabilityFlags < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ FALSE_POSITIVE_ENUM_VALUE = 0
+
+ disable_ddl_transaction!
+
+ def up
+ create_table_with_constraints :vulnerability_flags do |t|
+ t.timestamps_with_timezone null: false
+
+ t.references :vulnerability_occurrence, null: false, foreign_key: { on_delete: :cascade }
+
+ t.integer :flag_type, limit: 2, null: false, default: FALSE_POSITIVE_ENUM_VALUE
+
+ t.text :origin, null: false
+ t.text :description, null: false
+
+ t.text_limit :origin, 255
+ t.text_limit :description, 1024
+ end
+ end
+
+ def down
+ drop_table :vulnerability_flags
+ end
+end