This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
phone_app/db/migrate/20210928122901_create_pg_search_documents.rb
2021-09-28 14:29:38 +02:00

18 lines
461 B
Ruby

class CreatePgSearchDocuments < ActiveRecord::Migration[6.0]
def up
say_with_time("Creating table for pg_search multisearch") do
create_table :pg_search_documents do |t|
t.text :content
t.belongs_to :searchable, 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