Safely Add Hstore Support to Postgres via ActiveRecord Migrations
class AddHstoreToPostGres < ActiveRecord::Migration
def up
execute "CREATE EXTENSION IF NOT EXISTS hstore"
end
def down
execute "DROP EXTENSION IF EXISTS hstore"
end
end
Written by Charles Zhang
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#