aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/schema_dumper.rb
diff options
context:
space:
mode:
authorJeremy Daer <jeremydaer@gmail.com>2016-04-19 12:16:24 -0700
committerJeremy Daer <jeremydaer@gmail.com>2016-04-19 12:31:23 -0700
commit1683410c5eb92882e0d2b886f79eaba15eed23fd (patch)
tree9324784dd46916fc4268c190e8d2b99caea832af /activerecord/lib/active_record/schema_dumper.rb
parent5fa91521839cc91096c24c05783b9e9b3b9b0f2a (diff)
downloadrails-1683410c5eb92882e0d2b886f79eaba15eed23fd.tar.gz
rails-1683410c5eb92882e0d2b886f79eaba15eed23fd.tar.bz2
rails-1683410c5eb92882e0d2b886f79eaba15eed23fd.zip
Database comments: Treat blank comments as no comment. Don't dump blank comments.
Diffstat (limited to 'activerecord/lib/active_record/schema_dumper.rb')
-rw-r--r--activerecord/lib/active_record/schema_dumper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb
index b4229cba04..c2662ec476 100644
--- a/activerecord/lib/active_record/schema_dumper.rb
+++ b/activerecord/lib/active_record/schema_dumper.rb
@@ -138,7 +138,7 @@ HEADER
table_options = @connection.table_options(table)
tbl.print ", options: #{table_options.inspect}" unless table_options.blank?
- if comment = @connection.table_comment(table)
+ if comment = @connection.table_comment(table).presence
tbl.print ", comment: #{comment.inspect}"
end