Skip to content

Instantly share code, notes, and snippets.

@tddium
Created March 15, 2012 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tddium/2042687 to your computer and use it in GitHub Desktop.
Save tddium/2042687 to your computer and use it in GitHub Desktop.
Installing Postgres database extensions in Tddium
# Copyright (c) 2011, 2012 Solano Labs All Rights Reserved
namespace :tddium do
desc "load database extensions"
task :db_hook do
Rake::Task["tddium:default_db_hook"].invoke
# There is not yet a way to determine Tddium PG version from environment
contrib = '/usr/share/postgresql/8.4/contrib/hstore.sql'
Kernel.system("psql #{ENV['TDDIUM_DB_NAME']} -f #{contrib}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment