diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2005-09-20 01:33:43 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2005-09-20 01:33:43 +0000 |
commit | 3e2bac428dab23f7455893b62d78be9817906d25 (patch) | |
tree | e50e28694de11650a7e145654ac75e02e5f15239 /activerecord/lib/active_record | |
parent | 390280b842605d78ec1ab968605e5968677c9400 (diff) | |
download | rails-3e2bac428dab23f7455893b62d78be9817906d25.tar.gz rails-3e2bac428dab23f7455893b62d78be9817906d25.tar.bz2 rails-3e2bac428dab23f7455893b62d78be9817906d25.zip |
Improved migrations' behavior when the schema_info table is empty.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 9cde37548d..a772dce55a 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -170,7 +170,7 @@ module ActiveRecord end def current_version - (Base.connection.select_one("SELECT version FROM schema_info") || {})["version"].to_i + (Base.connection.select_one("SELECT version FROM schema_info") || {"version" => 0})["version"].to_i end end |