Rails migrations with database-specific data types Rails migrations with database-specific data types ruby-on-rails ruby-on-rails

Rails migrations with database-specific data types


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