FIX: correct old username index

(in some cases search was not finding accounts)
This commit is contained in:
Sam
2014-11-18 14:32:13 +11:00
parent f73aa444ee
commit b4844d4477
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,11 @@
class CorrectUsernameSearch < ActiveRecord::Migration
def up
execute "update user_search_data
set search_data = TO_TSVECTOR('simple', username_lower || ' ' || lower(name))
from users
where users.id = user_search_data.user_id"
end
def down
end
end