Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't dump schema for every test run, just when migrations are run
  • Loading branch information
jeremy committed Jun 16, 2008
1 parent 899d63b commit 8e74a43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/lib/tasks/databases.rake
Expand Up @@ -337,10 +337,10 @@ namespace :db do
end
end

desc 'Prepare the test database and load the schema'
task :prepare => %w(environment db:abort_if_pending_migrations) do
desc 'Check for pending migrations and load the test schema'
task :prepare => 'db:abort_if_pending_migrations' do
if defined?(ActiveRecord) && !ActiveRecord::Base.configurations.blank?
Rake::Task[{ :sql => "db:test:clone_structure", :ruby => "db:test:clone" }[ActiveRecord::Base.schema_format]].invoke
Rake::Task[{ :sql => "db:test:clone_structure", :ruby => "db:schema:load" }[ActiveRecord::Base.schema_format]].invoke
end
end
end
Expand Down

0 comments on commit 8e74a43

Please sign in to comment.