install pg_search
This commit is contained in:
parent
2cf5b53cba
commit
5b71fff2d6
1
Gemfile
1
Gemfile
@ -98,6 +98,7 @@ gem "country_select"
|
||||
gem 'haml-rails'
|
||||
gem 'rails_autolink'
|
||||
|
||||
gem 'pg_search'
|
||||
|
||||
group :development do
|
||||
gem "capistrano", "~> 3.10", require: false
|
||||
|
@ -230,6 +230,9 @@ GEM
|
||||
nokogiri (1.10.10)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
pg (1.2.3)
|
||||
pg_search (2.3.5)
|
||||
activerecord (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
posix-spawn (0.3.13)
|
||||
postgresql (1.0.0)
|
||||
pg
|
||||
@ -388,6 +391,7 @@ DEPENDENCIES
|
||||
mimemagic (= 0.3.10)
|
||||
mysql2
|
||||
nokogiri
|
||||
pg_search
|
||||
posix-spawn
|
||||
postgresql
|
||||
puma (~> 3.11)
|
||||
|
17
db/migrate/20210928122901_create_pg_search_documents.rb
Normal file
17
db/migrate/20210928122901_create_pg_search_documents.rb
Normal file
@ -0,0 +1,17 @@
|
||||
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
|
3460
db/schema.rb
3460
db/schema.rb
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user