Skip to content

Instantly share code, notes, and snippets.

@tehpeh
Created September 17, 2012 02:05
Show Gist options
  • Save tehpeh/3735174 to your computer and use it in GitHub Desktop.
Save tehpeh/3735174 to your computer and use it in GitHub Desktop.
Enable hstore on rake db:schema:load
namespace :db do
namespace :enable do
desc "enable hstore extension"
task :hstore => [:environment, :load_config] do
ActiveRecord::Base.connection.execute('CREATE EXTENSION IF NOT EXISTS hstore;')
end
end
Rake::Task['db:schema:load'].enhance ['db:enable:hstore']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment