Last Updated: February 25, 2016
·
613
· rebelvc

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