diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-06 18:57:19 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-06 18:57:19 +0000 |
commit | 699da7001b9e3d35c282ab3eb5371ba668bdeaa3 (patch) | |
tree | fa7000dedc893ebd54b0fdce07857f3946789f9d /activerecord/lib/active_record | |
parent | ee6232e6077b8178adf04626c0797594a673dcc2 (diff) | |
download | rails-699da7001b9e3d35c282ab3eb5371ba668bdeaa3.tar.gz rails-699da7001b9e3d35c282ab3eb5371ba668bdeaa3.tar.bz2 rails-699da7001b9e3d35c282ab3eb5371ba668bdeaa3.zip |
The test task stops with a warning if you have pending migrations. Closes #10377.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index fa9dc83255..cbdef1dd45 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -350,6 +350,10 @@ module ActiveRecord end end + def pending_migrations + migration_classes.select { |m| m.version > current_version } + end + private def migration_classes migrations = migration_files.inject([]) do |migrations, migration_file| |