Rails 3: migration error when using json as a column type in an ActiveRecord backed by Postgres

前端 未结 3 2008
别跟我提以往
别跟我提以往 2020-12-28 15:39

I am running Rails 3.2.17 and Postgres 9.3.4. I created a new ActiveRecord model using \"rails generate\" and one of the column types is json. My intention is to use the jso

3条回答
  •  情话喂你
    2020-12-28 16:16

    Set the following in application.rb

    config.active_record.schema_format = :sql
    

    Then structure.sql will be used instead of schema.rb to create the database from scratch. More info - https://github.com/diogob/activerecord-postgres-hstore

提交回复
热议问题