Rails migrations with database-specific data types

浪尽此生 提交于 2019-11-30 18:22:39

FYI for anyone who happens across this page, I fixed this by adding this (actually uncommenting it) to my Rails config:
config.active_record.schema_format = :sql

Have you tried specifying the type as a string instead of a symbol?

t.column "search_vectors", "tsvector"

If that doesn't work then you might need to drop down to database-specific SQL:

def self.up
  execute "--Put your PostgreSQL specific SQL statements here"
end
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!