hensei-api/db/migrate/20230705065015_create_pg_search_documents.rb
Justin Edmund 39a0d33bee
July 2023 Feature Release: Tagging objects (#118)
* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code

* Add granblue.team to cors

This works now!

* Implement all-entity search to support tagging objects (#117)

* Add table for multisearch

* Add new route for searching all entities

* Make models multisearchable

We're going to start with Character, Summon, Weapon and Jobs

* Add method to Search controller

This will search with trigram first, and then if there aren't enough results, search with prefixed text search

* Add support for Japanese all-entity search
2023-07-05 21:51:36 -07:00

21 lines
583 B
Ruby

class CreatePgSearchDocuments < ActiveRecord::Migration[7.0]
def up
say_with_time('Creating table for pg_search multisearch') do
create_table :pg_search_documents do |t|
t.text :content
t.string :granblue_id
t.string :name_en
t.string :name_jp
t.integer :element
t.belongs_to :searchable, type: :uuid, polymorphic: true, index: true
t.timestamps null: false
end
end
end
def down
say_with_time('Dropping table for pg_search multisearch') do
drop_table :pg_search_documents
end
end
end