Commit cc39f4ab authored by Yannis Roussos's avatar Yannis Roussos

Merge branch 'issue/277325' into 'master'

Issue/277325

See merge request gitlab-org/gitlab!48968
parents 15e99cd6 7de7b457
---
title: Add uuid column into security_findings table
merge_request: 48968
author: Harrison Brock @harrisonbrock
type: added
# frozen_string_literal: true
#
class AddColumnToSecurityFindings < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
add_column :security_findings, :uuid, :uuid
end
end
# frozen_string_literal: true
class AddIndexToSecurityFindingsUuid < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_security_findings_on_uuid'
disable_ddl_transaction!
def up
add_concurrent_index :security_findings, :uuid, name: INDEX_NAME, unique: true
end
def down
remove_concurrent_index_by_name :security_findings, INDEX_NAME
end
end
3b0e685327e2199e0a6721e00d1fa3c9fee3a173ce1cf5ddd99df3349a28fea9
\ No newline at end of file
d0706f4a60ae6f26be206aee80fdeb4a7e5c4c0b99e518140ae3cb8c47ed7a82
\ No newline at end of file
......@@ -16202,6 +16202,7 @@ CREATE TABLE security_findings (
project_fingerprint text NOT NULL,
deduplicated boolean DEFAULT false NOT NULL,
"position" integer,
uuid uuid,
CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40))
);
......@@ -22213,6 +22214,8 @@ CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING bt
CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity);
CREATE UNIQUE INDEX index_security_findings_on_uuid ON security_findings USING btree (uuid);
CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON self_managed_prometheus_alert_events USING btree (environment_id);
CREATE INDEX index_sent_notifications_on_noteable_type_noteable_id ON sent_notifications USING btree (noteable_id) WHERE ((noteable_type)::text = 'Issue'::text);
......
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