Skip to content
Snippets Groups Projects
Commit d8fb8e55 authored by Michał Zając's avatar Michał Zając Committed by Adam Hegyi
Browse files

Add index on security_findings(uuid id DESC)

The index was created asynchronously on GitLab.com via
gitlab-org/gitlab!91884
and this will result in a no-op. This migration is added for other
GitLab installations.

Changelog: added
parent 7ed58509
No related branches found
No related tags found
1 merge request!91885Add index on security_findings(uuid id DESC)
# frozen_string_literal: true
class CreateIndexOnSecurityFindingsUuidIdDesc < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'index_on_security_findings_uuid_and_id_order_desc'
def up
add_concurrent_index(
:security_findings,
%i[uuid id],
order: { id: :desc },
name: INDEX_NAME
)
end
def down
remove_concurrent_index_by_name(
:security_findings,
INDEX_NAME
)
end
end
b80d15b0176f0372a1553920ba72c43a2f9831f786358397f820a83b1b840cdc
\ No newline at end of file
......@@ -28985,6 +28985,8 @@ CREATE INDEX index_on_projects_path ON projects USING btree (path);
 
CREATE INDEX index_on_routes_lower_path ON routes USING btree (lower((path)::text));
 
CREATE INDEX index_on_security_findings_uuid_and_id_order_desc ON security_findings USING btree (uuid, id DESC);
CREATE INDEX index_on_users_lower_email ON users USING btree (lower((email)::text));
 
CREATE INDEX index_on_users_lower_username ON users USING btree (lower((username)::text));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment