From b0a35b6fe9c1a6a0eb14f2079a1bc8ff692ab621 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Tue, 7 Jun 2005 17:00:43 +0000 Subject: Sort the migration files explicitly so that they are always ordered correctly. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1394 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/migration.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/migration.rb') diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index a19381ea64..7a1c47038d 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -59,7 +59,7 @@ module ActiveRecord 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 @@ module ActiveRecord (up? && version.to_i <= current_version) || (down? && version.to_i > current_version) end end -end \ No newline at end of file +end -- cgit v1.2.3