Browse files

Fix up recreating postgresql database.

  • Loading branch information...
1 parent da9d598 commit 4748b77b57c259dfb047ea5f3a81a9f5fd5c81fa Charlie Savage committed Sep 30, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 tasks/databases/postgresql.rake
View
4 tasks/databases/postgresql.rake
@@ -15,6 +15,10 @@ namespace :postgresql do
desc 'Build the PostgreSQL test database'
task :build_database => [:create_database] do
+ ActiveRecord::Base.clear_all_connections!
+ spec = CompositePrimaryKeys::ConnectionSpec['postgresql'].dup
+ connection = ActiveRecord::Base.establish_connection(spec)
+
path = File.join(PROJECT_ROOT, 'test', 'fixtures', 'db_definitions', 'postgresql.sql')
sql = File.open(path, 'rb') do |file|
file.read

0 comments on commit 4748b77

Please sign in to comment.