diff options
author | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-20 03:10:42 +0400 |
---|---|---|
committer | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-22 05:23:33 +0400 |
commit | 70be713b158b181b548ce1b35abca65cad7d4f2a (patch) | |
tree | b2b56c7019567baf134b6d469ea163063d0c22c7 /lib | |
parent | bd1c8efe54f44083cbe81a04633621225ad4d43b (diff) |
Drop the integration databases in rebuild
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/db.rake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index ceae7f271..77b35bc08 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -4,7 +4,7 @@ namespace :db do desc "rebuild and prepare test db" - task :rebuild => [:drop, :create, :migrate, :seed,'db:test:prepare'] + task :rebuild => [:drop, :drop_integration, :create, :migrate, :seed, 'db:test:prepare'] namespace :integration do # desc 'Check for pending migrations and load the integration schema' @@ -81,6 +81,14 @@ namespace :db do end task :add_user => :environment + task :drop_integration do + ActiveRecord::Base.configurations.keys.select{ |k| + k.include?("integration") + }.each{ |k| + drop_database ActiveRecord::Base.configurations[k] + } + end + task :fix_diaspora_handle do puts "fixing the people in this seed" require File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment') |