diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb')
-rw-r--r-- | db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb b/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb new file mode 100644 index 00000000000..6f50376f6fa --- /dev/null +++ b/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class CreateSbomVulnerableComponentVersions < Gitlab::Database::Migration[2.0] + ADVISORY_INDEX_NAME = "index_vulnerable_component_versions_on_vulnerability_advisory" + SBOM_COMPONENT_INDEX_NAME = "index_vulnerable_component_versions_on_sbom_component_version" + + def change + create_table :sbom_vulnerable_component_versions do |t| + t.references :vulnerability_advisory, + index: { name: ADVISORY_INDEX_NAME } + + t.references :sbom_component_version, + index: { name: SBOM_COMPONENT_INDEX_NAME } + + t.timestamps_with_timezone null: false + end + end +end |