diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-22 23:04:54 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-22 23:04:54 +0900 |
commit | 6fd81d2d8ee77053c10a998c77d3799dfd3c51c0 (patch) | |
tree | 38563ccd840e8512ec22e5ab7d61ec00b086527b /activerecord/lib/active_record | |
parent | a0277a974ce881d975b13634bcc7da17bc906844 (diff) | |
download | rails-6fd81d2d8ee77053c10a998c77d3799dfd3c51c0.tar.gz rails-6fd81d2d8ee77053c10a998c77d3799dfd3c51c0.tar.bz2 rails-6fd81d2d8ee77053c10a998c77d3799dfd3c51c0.zip |
Return nil if table comment is blank
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index 3dad43ced8..6e35bb0bbe 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -284,7 +284,7 @@ module ActiveRecord def table_comment(table_name) # :nodoc: scope = quoted_scope(table_name) - query_value(<<-SQL.strip_heredoc, "SCHEMA") + query_value(<<-SQL.strip_heredoc, "SCHEMA").presence SELECT table_comment FROM information_schema.tables WHERE table_schema = #{scope[:schema]} |