diff options
author | Christopher Wade <wade.christopher@gmail.com> | 2011-04-30 00:48:06 -0500 |
---|---|---|
committer | Christopher Wade <wade.christopher@gmail.com> | 2011-05-09 01:45:45 -0500 |
commit | 2952040f7079669e6a55e7ffab167c2c7ff99afe (patch) | |
tree | bca2b3fdff475d7b92fbfca34cf4894606339727 /activerecord/lib/active_record | |
parent | 72a489345280964b4e4350fa6104658cd4e8da84 (diff) | |
download | rails-2952040f7079669e6a55e7ffab167c2c7ff99afe.tar.gz rails-2952040f7079669e6a55e7ffab167c2c7ff99afe.tar.bz2 rails-2952040f7079669e6a55e7ffab167c2c7ff99afe.zip |
Sort migrations by the migration ID.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index c6bc040f9f..a71bffd580 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -210,10 +210,10 @@ db_namespace = namespace :db do puts "\ndatabase: #{config['database']}\n\n" puts "#{'Status'.center(8)} #{'Migration ID'.ljust(14)} Migration Name" puts "-" * 50 - file_list.each do |file| + file_list.sort_by {|file| file[1]}.each do |file| puts "#{file[0].center(8)} #{file[1].ljust(14)} #{file[2].humanize}" end - db_list.each do |version| + db_list.sort.each do |version| puts "#{'up'.center(8)} #{version.ljust(14)} *** NO FILE ***" end puts |