Create a hstore column

suggest change

hstore columns can store settings. PostgreSQL provides them only after the extension is enabled. Call enable_extension on the migration, not inside the create_table block:

class CreatePages < ActiveRecord::Migration[5.0]
  def change
    enable_extension 'hstore' unless extension_enabled?('hstore')

    create_table :pages do |t|
      t.hstore :settings
      t.timestamps
    end
  end
end

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents