aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/rails_generator/commands.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 019f33aefc..eae7083fdd 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Make migration generator only report on exact duplicate names, not partial dupliate names. #3442 [jeremy@planetargon.com Marcel Molina Jr.]
+
* Fix typo in mailer generator USAGE. #3458 [chriztian.steinmeier@gmail.com]
* Ignore version mismatch between pg_dump and the database server. #3457 [simon.stapleton@gmail.com]
diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb
index 93d22ddef4..de6fefe093 100644
--- a/railties/lib/rails_generator/commands.rb
+++ b/railties/lib/rails_generator/commands.rb
@@ -61,7 +61,7 @@ module Rails
end
def existing_migrations(file_name)
- Dir.glob("#{@migration_directory}/[0-9]*_#{file_name}.rb")
+ Dir.glob("#{@migration_directory}/[0-9]*_*.rb").grep(/[0-9]+_#{file_name}.rb$/)
end
def migration_exists?(file_name)