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:
Diffstat (limited to 'db/migrate/20210623123722_add_present_on_default_branch_to_vulnerabilities.rb')
-rw-r--r--db/migrate/20210623123722_add_present_on_default_branch_to_vulnerabilities.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20210623123722_add_present_on_default_branch_to_vulnerabilities.rb b/db/migrate/20210623123722_add_present_on_default_branch_to_vulnerabilities.rb
new file mode 100644
index 00000000000..d528c4c6967
--- /dev/null
+++ b/db/migrate/20210623123722_add_present_on_default_branch_to_vulnerabilities.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddPresentOnDefaultBranchToVulnerabilities < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ def up
+ with_lock_retries do
+ add_column :vulnerabilities, :present_on_default_branch, :boolean, default: true, null: false
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :vulnerabilities, :present_on_default_branch
+ end
+ end
+end