Search code examples
rubypostgresqlmigrationsequelhstore

How do I create a hstore column in a Sequel migration?


How do I create a hstore column in a Sequel migration?

Sequel.migration do
  change do
    add_column :logs, :geo, HStore
  end
end

fails. Do I have to load an extension?


Solution

  • As the Author's gem answered me, the DB needs this additional extension before using it:

    CREATE EXTENSION hstore