Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't dump schema for every test run, just when migrations are run

  • Loading branch information...
commit 8e74a434b8f13bd1697ad556c9fd1ef0217e594e 1 parent 899d63b
@jeremy jeremy authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/tasks/databases.rake
View
6 railties/lib/tasks/databases.rake
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.