mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00: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
7 lines
339 B
Ruby
7 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
|