我試圖配置Texticle並在遷移時遇到此錯誤。錯誤味精是指我打上< < < <架構不存在Postgresql和Texticle的錯誤
PGError: ERROR: schema "half_links" does not exist
: CREATE VIEW searches AS
SELECT items.id AS searchable_id, items.name AS term,
CAST('Item' AS varchar) AS searchable_type
FROM items
UNION
SELECT half_links.id AS searchable_id, half_links.item.name AS term, <<<<
CAST('HalfLink' AS varchar) AS searchable_type
FROM half_links
行這是我的移民
class CreateSearches < ActiveRecord::Migration
def self.up
ActiveRecord::Base.connection.execute <<-SQL
CREATE VIEW searches AS
SELECT items.id AS searchable_id, items.name AS term,
CAST('Item' AS varchar) AS searchable_type
FROM items
UNION
SELECT half_links.id AS searchable_id, half_links.item.name AS term,
CAST('HalfLink' AS varchar) AS searchable_type
FROM half_links
SQL
end
和模型
:half_link belongs_to :item
:item has_many :half_links
林在我的本地PSQL運行此。我怎樣才能解決這個問題?
「half_links.item.name」是什麼意思? –