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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 00:09:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 00:09:02 +0300
commit76623c12c136f43f24c3966ed4b469e2c0b434b7 (patch)
tree7c5ec884c25e03e4fea131a4d112a9d0ccfd59b8 /db/migrate/20200203232433_create_security_scan.rb
parentb042382bbf5a4977c5b5c6b0a9a33f4e8ca8d16d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200203232433_create_security_scan.rb')
-rw-r--r--db/migrate/20200203232433_create_security_scan.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/db/migrate/20200203232433_create_security_scan.rb b/db/migrate/20200203232433_create_security_scan.rb
new file mode 100644
index 00000000000..a5fe73efbf2
--- /dev/null
+++ b/db/migrate/20200203232433_create_security_scan.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+class CreateSecurityScan < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def change
+ create_table :security_scans, id: :bigserial do |t|
+ t.timestamps_with_timezone null: false
+
+ t.references :build,
+ null: false,
+ index: false,
+ foreign_key: { to_table: :ci_builds, on_delete: :cascade },
+ type: :bigint
+
+ t.integer :scan_type,
+ null: false,
+ index: { name: "idx_security_scans_on_scan_type" },
+ limit: 2
+
+ t.index [:build_id, :scan_type], name: "idx_security_scans_on_build_and_scan_type", unique: true
+ end
+ end
+end