aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2015-12-18 14:52:05 +1030
committerMatthew Draper <matthew@trebex.net>2015-12-18 14:52:05 +1030
commite0e918609fc394e4c36b73bb2b0a485612789d6f (patch)
tree9e7735a2405a8ed5835ec3ee549a9b8104f1274d /activerecord/lib
parent093b3d6a967fe9e992a6de9527908e15345eb633 (diff)
parent835617b71d2e829c27dbd16a82f22c186c821a0f (diff)
downloadrails-e0e918609fc394e4c36b73bb2b0a485612789d6f.tar.gz
rails-e0e918609fc394e4c36b73bb2b0a485612789d6f.tar.bz2
rails-e0e918609fc394e4c36b73bb2b0a485612789d6f.zip
Merge pull request #20815 from byroot/do-not-include-column-limit-if-it-is-default
Do not include column limit in schema.rb if it matches the default
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb
index e252ddb4cf..797662d07c 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb
@@ -61,8 +61,8 @@ module ActiveRecord
end
def schema_limit(column)
- limit = column.limit || native_database_types[column.type][:limit]
- limit.inspect if limit
+ limit = column.limit
+ limit.inspect if limit && limit != native_database_types[column.type][:limit]
end
def schema_precision(column)