add trigram index to user names

This commit is contained in:
r888888888 2017-01-17 15:31:22 -08:00
parent a53341d112
commit 8333673b62

View 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