aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-10-10 20:07:09 -0300
committerGitHub <noreply@github.com>2016-10-10 20:07:09 -0300
commit36f6ab2d8e0ef84f520bb6169b61a8d79f222cfc (patch)
tree54de9e90fdf4d399fff3e3ff2206f38e29bc1d65 /activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
parent15fa282148c3fef064e9cee6564f60ea32f6a2d5 (diff)
parent0780c444dbf9793fdffaa631fa929d77f109e24f (diff)
downloadrails-36f6ab2d8e0ef84f520bb6169b61a8d79f222cfc.tar.gz
rails-36f6ab2d8e0ef84f520bb6169b61a8d79f222cfc.tar.bz2
rails-36f6ab2d8e0ef84f520bb6169b61a8d79f222cfc.zip
Merge pull request #26753 from kamipo/fix_table_comment_dumping
Fix table comment dumping
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
index 29a77580f5..83310233f0 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
@@ -239,7 +239,9 @@ module ActiveRecord
end
def table_options(table_name) # :nodoc:
- { comment: table_comment(table_name) }
+ if comment = table_comment(table_name)
+ { comment: comment }
+ end
end
# Returns a comment stored in database for given table