2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 00:06:56 -04:00
|
|
|
class CorrectUsernameSearch < ActiveRecord::Migration[4.2]
|
2014-11-17 22:32:13 -05:00
|
|
|
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
|