mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-21 14:19:39 +02:00
* Initial pass at stock filtering * Rough in filter * Cleaning up security listing * Tweak to search function * Combobox tweaks * Clean up search query * Update trades test with combobox * Update securities.yml
6 lines
339 B
Ruby
6 lines
339 B
Ruby
class AddSearchVectorToSecurities < ActiveRecord::Migration[7.2]
|
|
def change
|
|
add_column :securities, :search_vector, :virtual, type: :tsvector, as: "setweight(to_tsvector('simple', coalesce(ticker, '')), 'B') || to_tsvector('simple', coalesce(name, ''))", stored: true
|
|
add_index :securities, :search_vector, using: :gin
|
|
end
|
|
end
|