diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index acafda0048..cca46f1df4 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -382,7 +382,8 @@ module ActiveRecord end def reached_target_version?(version) - (up? && version.to_i - 1 == @target_version) || (down? && version.to_i == @target_version) + return false if @target_version == nil + (up? && version.to_i - 1 >= @target_version) || (down? && version.to_i <= @target_version) end def irrelevant_migration?(version) |