Skip to content

Instantly share code, notes, and snippets.

@FerPerales
Forked from tehpeh/db.rake
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FerPerales/0302b8bea1517d14b2ac to your computer and use it in GitHub Desktop.
Save FerPerales/0302b8bea1517d14b2ac to your computer and use it in GitHub Desktop.
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