From 74d3673b0cf2e51ad05ae22eef8f1b8f6b316870 Mon Sep 17 00:00:00 2001 From: kates Date: Tue, 20 Apr 2010 18:02:50 +0800 Subject: [PATCH] making rake db:migrate VERSION=0 a noop when called in succession. [#2137 state:resolved] --- activerecord/lib/active_record/migration.rb | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index c0b4b13..9f90e98 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -381,6 +381,7 @@ module ActiveRecord def migrate(migrations_path, target_version = nil) case when target_version.nil? then up(migrations_path, target_version) + when current_version == 0 && target_version == 0 then # noop when current_version > target_version then down(migrations_path, target_version) else up(migrations_path, target_version) end -- 1.6.1.rc1.35.gae26e