summaryrefslogtreecommitdiff
path: root/db/migrate/20200604143628_create_project_security_settings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200604143628_create_project_security_settings.rb')
-rw-r--r--db/migrate/20200604143628_create_project_security_settings.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/db/migrate/20200604143628_create_project_security_settings.rb b/db/migrate/20200604143628_create_project_security_settings.rb
new file mode 100644
index 00000000000..b1a08cf8781
--- /dev/null
+++ b/db/migrate/20200604143628_create_project_security_settings.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class CreateProjectSecuritySettings < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ with_lock_retries do
+ create_table :project_security_settings, id: false do |t|
+ t.references :project, primary_key: true, index: false, foreign_key: { on_delete: :cascade }
+ t.timestamps_with_timezone
+
+ t.boolean :auto_fix_container_scanning, default: true, null: false
+ t.boolean :auto_fix_dast, default: true, null: false
+ t.boolean :auto_fix_dependency_scanning, default: true, null: false
+ t.boolean :auto_fix_sast, default: true, null: false
+ end
+ end
+ end
+
+ def down
+ with_lock_retries do
+ # rubocop:disable Migration/DropTable
+ drop_table :project_security_settings
+ # rubocop:enable Migration/DropTable
+ end
+ end
+end