diff options
author | Jamis Buck <jamis@37signals.com> | 2005-06-07 17:00:43 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-06-07 17:00:43 +0000 |
commit | b0a35b6fe9c1a6a0eb14f2079a1bc8ff692ab621 (patch) | |
tree | a4a22bd3091839072d693c426c5af6ffc672ea91 /activerecord/lib | |
parent | 7411af95dbafd48934d737a2fdad8255946c269a (diff) | |
download | rails-b0a35b6fe9c1a6a0eb14f2079a1bc8ff692ab621.tar.gz rails-b0a35b6fe9c1a6a0eb14f2079a1bc8ff692ab621.tar.bz2 rails-b0a35b6fe9c1a6a0eb14f2079a1bc8ff692ab621.zip |
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
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |