summaryrefslogtreecommitdiff
path: root/db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb')
-rw-r--r--db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb b/db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb
new file mode 100644
index 00000000000..cd325747282
--- /dev/null
+++ b/db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddSecurityDashboardAccessLevelIntoProjectFeatures < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ PRIVATE_ACCESS_LEVEL = 10
+
+ def up
+ with_lock_retries do
+ add_column :project_features, :security_and_compliance_access_level, :integer, default: PRIVATE_ACCESS_LEVEL, null: false
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :project_features, :security_and_compliance_access_level
+ end
+ end
+end