diff --git a/app/models/vulnerability.rb b/app/models/vulnerability.rb index abdf585af8123a7ce4de54008ee8e810b134aa84..1dff78354db5f18e0c81e49b1f684f4635bcc7bd 100644 --- a/app/models/vulnerability.rb +++ b/app/models/vulnerability.rb @@ -5,7 +5,7 @@ class Vulnerability < ApplicationRecord include EachBatch include IgnorableColumns - ignore_column :milestone_id, remove_with: '16.9', remove_after: '2023-01-13' + ignore_column %i[epic_id milestone_id], remove_with: '16.9', remove_after: '2023-01-13' alias_attribute :vulnerability_id, :id diff --git a/ee/app/models/ee/vulnerability.rb b/ee/app/models/ee/vulnerability.rb index 7ff27fb2e00733a3e552a98ad12e1f2972983a20..177bdf97749b02b6dea1bca5d8082d55e4f6e694 100644 --- a/ee/app/models/ee/vulnerability.rb +++ b/ee/app/models/ee/vulnerability.rb @@ -35,8 +35,6 @@ module Vulnerability redact_field :description belongs_to :project # keep this association named 'project' for correct work of markdown cache - belongs_to :epic - belongs_to :author, class_name: 'User' # keep this association named 'author' for correct work of markdown cache belongs_to :updated_by, class_name: 'User' belongs_to :last_edited_by, class_name: 'User' diff --git a/ee/spec/models/ee/vulnerability_spec.rb b/ee/spec/models/ee/vulnerability_spec.rb index 8793f1394d5ccb26896f234acc10b2dd44f0e460..b0227b01d424d8cb4c58a512bf94cb248751e666 100644 --- a/ee/spec/models/ee/vulnerability_spec.rb +++ b/ee/spec/models/ee/vulnerability_spec.rb @@ -48,7 +48,6 @@ subject { build(:vulnerability) } it { is_expected.to belong_to(:project) } - it { is_expected.to belong_to(:epic) } it { is_expected.to have_many(:findings).class_name('Vulnerabilities::Finding').inverse_of(:vulnerability) } it { is_expected.to have_many(:dismissed_findings).class_name('Vulnerabilities::Finding').inverse_of(:vulnerability) } it { is_expected.to have_many(:merge_request_links).class_name('Vulnerabilities::MergeRequestLink').inverse_of(:vulnerability) }