Commit 05b01676 authored by Patrick Bair's avatar Patrick Bair

Merge branch 'add-index-snippets-project-id-and-title' into 'master'

Add index snippets on project_id and title

See merge request gitlab-org/gitlab!76161
parents b990ab0b d5b0bcaf
# frozen_string_literal: true
class AddIndexSnippetsOnProjectIdAndTitle < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
INDEX_NAME = 'index_snippets_on_project_id_and_title'
def up
add_concurrent_index :snippets, [:project_id, :title], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :snippets, name: INDEX_NAME
end
end
6a3591e70ddd6573ad68360c1a8774ef61e7812ce831c75066baec5754e2bd76
\ No newline at end of file
...@@ -27448,6 +27448,8 @@ CREATE INDEX index_snippets_on_id_and_created_at ON snippets USING btree (id, cr ...@@ -27448,6 +27448,8 @@ CREATE INDEX index_snippets_on_id_and_created_at ON snippets USING btree (id, cr
CREATE INDEX index_snippets_on_id_and_type ON snippets USING btree (id, type); CREATE INDEX index_snippets_on_id_and_type ON snippets USING btree (id, type);
CREATE INDEX index_snippets_on_project_id_and_title ON snippets USING btree (project_id, title);
CREATE INDEX index_snippets_on_project_id_and_visibility_level ON snippets USING btree (project_id, visibility_level); CREATE INDEX index_snippets_on_project_id_and_visibility_level ON snippets USING btree (project_id, visibility_level);
CREATE INDEX index_snippets_on_title_trigram ON snippets USING gin (title gin_trgm_ops); CREATE INDEX index_snippets_on_title_trigram ON snippets USING gin (title gin_trgm_ops);
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