Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-12-01 12:10:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-01 12:10:25 +0300
commit7bc1ee0bcb9cefaf788aa0b93383b7347e9010b0 (patch)
tree4cd125d7c55603ae87b2ca93b8ef89d71c2c5ef8 /db
parent9b646e9297a1d9bcc7397c76010011f56df1579d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20211008043855_remove_notes_trigram_index.rb15
-rw-r--r--db/schema_migrations/202110080438551
-rw-r--r--db/structure.sql2
3 files changed, 16 insertions, 2 deletions
diff --git a/db/migrate/20211008043855_remove_notes_trigram_index.rb b/db/migrate/20211008043855_remove_notes_trigram_index.rb
new file mode 100644
index 00000000000..a20ef1852e2
--- /dev/null
+++ b/db/migrate/20211008043855_remove_notes_trigram_index.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class RemoveNotesTrigramIndex < Gitlab::Database::Migration[1.0]
+ disable_ddl_transaction!
+
+ NOTES_TRIGRAM_INDEX_NAME = 'index_notes_on_note_trigram'
+
+ def up
+ remove_concurrent_index_by_name(:notes, NOTES_TRIGRAM_INDEX_NAME)
+ end
+
+ def down
+ add_concurrent_index :notes, :note, name: NOTES_TRIGRAM_INDEX_NAME, using: :gin, opclass: { content: :gin_trgm_ops }
+ end
+end
diff --git a/db/schema_migrations/20211008043855 b/db/schema_migrations/20211008043855
new file mode 100644
index 00000000000..0abc8393efa
--- /dev/null
+++ b/db/schema_migrations/20211008043855
@@ -0,0 +1 @@
+166ae24ae4856488c81a71c650dca038c8cd7cb2221545e84431e118da097688 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 688c8b4553f..b8c75e33e7b 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -26577,8 +26577,6 @@ CREATE INDEX index_notes_on_discussion_id ON notes USING btree (discussion_id);
CREATE INDEX index_notes_on_line_code ON notes USING btree (line_code);
-CREATE INDEX index_notes_on_note_trigram ON notes USING gin (note gin_trgm_ops);
-
CREATE INDEX index_notes_on_noteable_id_and_noteable_type_and_system ON notes USING btree (noteable_id, noteable_type, system);
CREATE INDEX index_notes_on_project_id_and_id_and_system_false ON notes USING btree (project_id, id) WHERE (NOT system);