提交 3e2bac42 编写于 作者: N Nicholas Seckar

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
上级 390280b8
*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]
......
......@@ -170,7 +170,7 @@ def down(migrations_path, target_version = nil)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册