1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Nicholas Seckar 2005-09-20 01:33:43 +00:00
parent 390280b842
commit 3e2bac428d
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Improved migrations' behavior when the schema_info table is empty. [Nicholas Seckar]
* Fixed that Observers didn't observe sub-classes #627 [Florian Weber]
* Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222 [Marcel Molina]

View file

@ -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