Drop the integration databases in rebuild
This commit is contained in:
parent
bd1c8efe54
commit
70be713b15
1 changed files with 9 additions and 1 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace :db do
|
namespace :db do
|
||||||
desc "rebuild and prepare test db"
|
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
|
namespace :integration do
|
||||||
# desc 'Check for pending migrations and load the integration schema'
|
# desc 'Check for pending migrations and load the integration schema'
|
||||||
|
|
@ -81,6 +81,14 @@ namespace :db do
|
||||||
end
|
end
|
||||||
task :add_user => :environment
|
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
|
task :fix_diaspora_handle do
|
||||||
puts "fixing the people in this seed"
|
puts "fixing the people in this seed"
|
||||||
require File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment')
|
require File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue