Commit b3a2a400 authored by Tiger Watson's avatar Tiger Watson

Merge branch '348396-drop-position' into 'master'

Drop column `position` from `security_findings`

See merge request gitlab-org/gitlab!78665
parents fe086e1e 4ce8c43a
# frozen_string_literal: true
class DropPositionFromSecurityFindings < Gitlab::Database::Migration[1.0]
enable_lock_retries!
def change
remove_column :security_findings, :position, :integer
end
end
69d8283501ba6a4946a60e3812fe2cf3031fc4a915d6e7c6fac3bf272423f2f2
\ No newline at end of file
......@@ -19397,7 +19397,6 @@ CREATE TABLE security_findings (
confidence smallint NOT NULL,
project_fingerprint text,
deduplicated boolean DEFAULT false NOT NULL,
"position" integer,
uuid uuid,
overridden_uuid uuid,
CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40))
......@@ -27560,8 +27559,6 @@ CREATE INDEX index_security_findings_on_project_fingerprint ON security_findings
CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated);
CREATE UNIQUE INDEX index_security_findings_on_scan_id_and_position ON security_findings USING btree (scan_id, "position");
CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id);
CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity);
# frozen_string_literal: true
require 'spec_helper'
require_migration!('drop_position_from_security_findings')
RSpec.describe DropPositionFromSecurityFindings do
let(:events) { table(:security_findings) }
it 'correctly migrates up and down' do
reversible_migration do |migration|
migration.before -> {
expect(events.column_names).to include('position')
}
migration.after -> {
events.reset_column_information
expect(events.column_names).not_to include('position')
}
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment