Skip to content
Browse files

Sort the migration files explicitly so that they are always ordered c…

…orrectly.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1394 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 7411af9 commit b0a35b6fe9c1a6a0eb14f2079a1bc8ff692ab621 @jamis jamis committed Jun 7, 2005
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/migration.rb
View
4 activerecord/lib/active_record/migration.rb
@@ -59,7 +59,7 @@ def migration_classes
end
def migration_files
- files = Dir["#{@migrations_path}/[0-9]*_*.rb"]
+ files = Dir["#{@migrations_path}/[0-9]*_*.rb"].sort
down? ? files.reverse : files
end
@@ -91,4 +91,4 @@ def irrelevant_migration?(version)
(up? && version.to_i <= current_version) || (down? && version.to_i > current_version)
end
end
-end
+end

0 comments on commit b0a35b6

Please sign in to comment.
Something went wrong with that request. Please try again.