Skip to content
Browse files

just check pending migrations in the current environment

  • Loading branch information...
1 parent 76a8091 commit 056030886c117606502c77a0b0f8f5f6ea248892 @tenderlove tenderlove committed Apr 5, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/railties/databases.rake
View
4 activerecord/lib/active_record/railties/databases.rake
@@ -166,7 +166,7 @@ db_namespace = namespace :db do
end
# desc "Raises an error if there are pending migrations"
- task :abort_if_pending_migrations => 'db:test:load_schema' do
+ task :abort_if_pending_migrations => :environment do
pending_migrations = ActiveRecord::Migrator.open(ActiveRecord::Migrator.migrations_paths).pending_migrations
if pending_migrations.any?
@@ -383,5 +383,5 @@ namespace :railties do
end
end
-task 'test:prepare' => ['db:test:prepare', 'db:abort_if_pending_migrations']
+task 'test:prepare' => ['db:test:prepare', 'db:test:load_schema', 'db:abort_if_pending_migrations']

0 comments on commit 0560308

Please sign in to comment.
Something went wrong with that request. Please try again.