Skip to content

Instantly share code, notes, and snippets.

@ntamvl
Forked from andreypronin/setup_hstore.rb
Last active February 21, 2024 11:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntamvl/a6b713e5e4a464ae8e81f4b5aa1b0a69 to your computer and use it in GitHub Desktop.
Save ntamvl/a6b713e5e4a464ae8e81f4b5aa1b0a69 to your computer and use it in GitHub Desktop.
Migration to enable hstore for PostgreSQL with Rails 4.See also http://platformonrails.wordpress.com/2013/03/17/using-postgres…e-with-rails-4/
class SetupHstore < ActiveRecord::Migration
def self.up
enable_extension "hstore"
end
def self.down
disable_extension "hstore"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment