diff --git a/db/post_migrate/20240101133628_remove_start_date_column_from_vulnerabilities.rb b/db/post_migrate/20240101133628_remove_start_date_column_from_vulnerabilities.rb new file mode 100644 index 0000000000000000000000000000000000000000..747ff35377b43279325983e2fb76d597f8a84b14 --- /dev/null +++ b/db/post_migrate/20240101133628_remove_start_date_column_from_vulnerabilities.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class RemoveStartDateColumnFromVulnerabilities < Gitlab::Database::Migration[2.2] + milestone '16.8' + + enable_lock_retries! + + def up + remove_column :vulnerabilities, :start_date + end + + def down + add_column :vulnerabilities, :start_date, :date + end +end diff --git a/db/schema_migrations/20240101133628 b/db/schema_migrations/20240101133628 new file mode 100644 index 0000000000000000000000000000000000000000..129206c5564d7514803409ce135fd86017e6e0d6 --- /dev/null +++ b/db/schema_migrations/20240101133628 @@ -0,0 +1 @@ +61b8bed56b1aa5fbce448cc8b90ec863801fbffb0a81f857ce512052f47ba1cb \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index b0bd513e601a28b6e60d8ec87fb5046f92855b12..5a6dad6fb465a3317c199d27751dddfd54708622 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -24904,7 +24904,6 @@ CREATE TABLE vulnerabilities ( epic_id bigint, project_id bigint NOT NULL, author_id bigint NOT NULL, - start_date date, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, title character varying(255) NOT NULL, diff --git a/ee/spec/models/ee/vulnerability_spec.rb b/ee/spec/models/ee/vulnerability_spec.rb index 22eced10917ad8c9f5ca9e4b7ea9e195dd64f8f1..fe19b0f9b7da0a9b26768e0a7371e859df43684b 100644 --- a/ee/spec/models/ee/vulnerability_spec.rb +++ b/ee/spec/models/ee/vulnerability_spec.rb @@ -29,7 +29,7 @@ let_it_be(:vulnerability) { create(:vulnerability, :sast, :confirmed, :low, :with_state_transition, project: project) } let_it_be(:finding) { create(:vulnerabilities_finding, vulnerability: vulnerability) } - it { is_expected.to have_locked_schema('b1278ab481678e3a0962433517923c9a81d451c8e4b1fc85aaa080f5e5924330').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') } + it { is_expected.to have_locked_schema('c44ba975c0533ef0f7e338c8acbf8813427a2a0302180f28243a3853162bb6fa').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') } it_behaves_like 'vulnerability and finding shared examples' do let(:transformer_method) { :itself }