tags: add trigram index on tag names.
This commit is contained in:
9
db/migrate/20171127195124_add_trigram_index_to_tags.rb
Normal file
9
db/migrate/20171127195124_add_trigram_index_to_tags.rb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
class AddTrigramIndexToTags < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
execute "create index index_tags_on_name_trgm on tags using gin (name gin_trgm_ops)"
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
execute "drop index index_tags_on_name_trgm"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -7008,6 +7008,13 @@ CREATE UNIQUE INDEX index_tags_on_name ON tags USING btree (name);
|
|||||||
CREATE INDEX index_tags_on_name_pattern ON tags USING btree (name text_pattern_ops);
|
CREATE INDEX index_tags_on_name_pattern ON tags USING btree (name text_pattern_ops);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: index_tags_on_name_trgm; Type: INDEX; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX index_tags_on_name_trgm ON tags USING gin (name gin_trgm_ops);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: index_token_buckets_on_user_id; Type: INDEX; Schema: public; Owner: -
|
-- Name: index_token_buckets_on_user_id; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@@ -7521,3 +7528,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170914200122');
|
|||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20171106075030');
|
INSERT INTO schema_migrations (version) VALUES ('20171106075030');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20171127195124');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user