diff --git a/db/post_migrate/20231220130725_remove_last_edited_at_column_from_vulnerabilities.rb b/db/post_migrate/20231220130725_remove_last_edited_at_column_from_vulnerabilities.rb new file mode 100644 index 0000000000000000000000000000000000000000..e3e963ee0c0c95fffd316431a93267cb0a11a364 --- /dev/null +++ b/db/post_migrate/20231220130725_remove_last_edited_at_column_from_vulnerabilities.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class RemoveLastEditedAtColumnFromVulnerabilities < Gitlab::Database::Migration[2.2] + milestone '16.8' + + enable_lock_retries! + + def up + remove_column :vulnerabilities, :last_edited_at + end + + def down + add_column :vulnerabilities, :last_edited_at, :datetime_with_timezone + end +end diff --git a/db/schema_migrations/20231220130725 b/db/schema_migrations/20231220130725 new file mode 100644 index 0000000000000000000000000000000000000000..85a0fbfc47d22d970a3eb12248e5f5d55eb00fec --- /dev/null +++ b/db/schema_migrations/20231220130725 @@ -0,0 +1 @@ +a331c4c68080c60637b361b1778d840c367e1fe3dd1d588476a8a00fb5001389 \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 77723578965a601bc2faf1c60e54ec6b30e7c8ee..f28d7cf6266fbde39ce557ea8239400afa760e55 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -24898,7 +24898,6 @@ CREATE TABLE vulnerabilities ( updated_by_id bigint, last_edited_by_id bigint, start_date date, - last_edited_at timestamp with time zone, 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 aef6efd4799901683043671e2e4c475fb0271049..6330ba9e7a5f47662200410830758a80323a2d36 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('aeb78a130abaae6d526c87dc265c987b23074746d7fb1912de7e6969e93090d1').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') } + it { is_expected.to have_locked_schema('cb13c5ef1e2f527aa7af69b2d8613551b6ec048628f4c10f65217657454b0bbb').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') } it_behaves_like 'vulnerability and finding shared examples' do let(:transformer_method) { :itself }