add trigram index to user names
This commit is contained in:
6
db/migrate/20170117233040_add_trigram_index_to_users.rb
Normal file
6
db/migrate/20170117233040_add_trigram_index_to_users.rb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
class AddTrigramIndexToUsers < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
execute "set statement_timeout = 0"
|
||||||
|
execute "create index index_users_on_name_trgm on users using gin (lower(name) gin_trgm_ops)"
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user