mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: correct old username index
(in some cases search was not finding accounts)
This commit is contained in:
11
db/migrate/20141118011735_correct_username_search.rb
Normal file
11
db/migrate/20141118011735_correct_username_search.rb
Normal 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
|
Reference in New Issue
Block a user