summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-15 18:09:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-15 18:09:57 +0000
commita8476fe0cd764ac054763032b7cf6e63b0b493c5 (patch)
treeba2685026667de0b5d67c75bf98bb87014f01b32 /db
parent68d7192881c41305da9c6aa1e3f7dd8b47f286a7 (diff)
downloadgitlab-ce-a8476fe0cd764ac054763032b7cf6e63b0b493c5.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210614131002_add_detection_method_to_vulnerabilities_finding.rb17
-rw-r--r--db/schema_migrations/202106141310021
-rw-r--r--db/structure.sql1
3 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20210614131002_add_detection_method_to_vulnerabilities_finding.rb b/db/migrate/20210614131002_add_detection_method_to_vulnerabilities_finding.rb
new file mode 100644
index 00000000000..cc37c5f1020
--- /dev/null
+++ b/db/migrate/20210614131002_add_detection_method_to_vulnerabilities_finding.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddDetectionMethodToVulnerabilitiesFinding < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ def up
+ with_lock_retries do
+ add_column :vulnerability_occurrences, :detection_method, :smallint, null: false, default: 0
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :vulnerability_occurrences, :detection_method
+ end
+ end
+end
diff --git a/db/schema_migrations/20210614131002 b/db/schema_migrations/20210614131002
new file mode 100644
index 00000000000..6d59a254365
--- /dev/null
+++ b/db/schema_migrations/20210614131002
@@ -0,0 +1 @@
+dedf2f8d76f4131f34d61fe2c730f8b092ca46f8b35b08a76b7bc096c140aad1 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 3b681ff6cdb..fcac180738c 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -19272,6 +19272,7 @@ CREATE TABLE vulnerability_occurrences (
solution text,
cve text,
location jsonb,
+ detection_method smallint DEFAULT 0 NOT NULL,
CONSTRAINT check_4a3a60f2ba CHECK ((char_length(solution) <= 7000)),
CONSTRAINT check_ade261da6b CHECK ((char_length(description) <= 15000)),
CONSTRAINT check_df6dd20219 CHECK ((char_length(message) <= 3000)),