diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-04-05 13:56:25 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-04-05 13:56:25 -0700 |
commit | 056030886c117606502c77a0b0f8f5f6ea248892 (patch) | |
tree | 746fd69b9c1b667e147ed11e91f97a4685c136ea /activerecord | |
parent | 76a80918b09f98c884094f82417865b8398373e9 (diff) | |
download | rails-056030886c117606502c77a0b0f8f5f6ea248892.tar.gz rails-056030886c117606502c77a0b0f8f5f6ea248892.tar.bz2 rails-056030886c117606502c77a0b0f8f5f6ea248892.zip |
just check pending migrations in the current environment
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 128223115c..93bbeea5a3 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/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'] |