summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 15:10:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 15:10:47 +0000
commit6f18a8d0b00eae84d262dff137fddd9639f3c52a (patch)
treef6297c5a843ee6096e996f58c768e80232e2b610 /db/migrate
parentc62dd5ae440db9ad4696000a863fbcb53fe83498 (diff)
downloadgitlab-ce-6f18a8d0b00eae84d262dff137fddd9639f3c52a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20230123095022_create_scan_result_policies.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20230123095022_create_scan_result_policies.rb b/db/migrate/20230123095022_create_scan_result_policies.rb
new file mode 100644
index 00000000000..d5cd8a017a1
--- /dev/null
+++ b/db/migrate/20230123095022_create_scan_result_policies.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class CreateScanResultPolicies < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = "index_scan_result_policies_on_policy_configuration_id".freeze
+
+ def change
+ create_table :scan_result_policies do |t|
+ t.references :security_orchestration_policy_configuration,
+ null: false,
+ foreign_key: { on_delete: :cascade },
+ index: { name: INDEX_NAME }
+
+ t.timestamps_with_timezone null: false
+ t.integer :orchestration_policy_idx, limit: 2, null: false
+ t.text :license_states, array: true, default: []
+ end
+ end
+end