diff options
author | Kevin Skoglund <kevin@novafabrica.com> | 2011-02-04 09:33:06 -0500 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-04 12:59:06 -0200 |
commit | 94175c0e39ae9fc8d22dc2c2c55f16c1d92f4090 (patch) | |
tree | 53cd2e958ef2353d82c447886dd4ee63b8085cc7 /activerecord/lib/active_record | |
parent | 89962d82f1f4c3d61d5851a4b0bca771357c6351 (diff) | |
download | rails-94175c0e39ae9fc8d22dc2c2c55f16c1d92f4090.tar.gz rails-94175c0e39ae9fc8d22dc2c2c55f16c1d92f4090.tar.bz2 rails-94175c0e39ae9fc8d22dc2c2c55f16c1d92f4090.zip |
Improve regex in rake db:migrate status [#5940 state:resolved]
[#5940 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 9924755ddf..49d4b8f76b 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -193,7 +193,7 @@ db_namespace = namespace :db do file_list = [] Dir.foreach(File.join(Rails.root, 'db', 'migrate')) do |file| # only files matching "20091231235959_some_name.rb" pattern - if match_data = /(\d{14})_(.+)\.rb/.match(file) + if match_data = /^(\d{14})_(.+)\.rb$/.match(file) status = db_list.delete(match_data[1]) ? 'up' : 'down' file_list << [status, match_data[1], match_data[2]] end |