diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2015-07-08 14:17:04 -0400 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2015-07-08 14:23:22 -0400 |
commit | 835617b71d2e829c27dbd16a82f22c186c821a0f (patch) | |
tree | fd2fd7d9db0141a06bdc525c7bd0c5316c973bc6 /activerecord/lib/active_record | |
parent | 1b4399dfe7eaa8dd2a75f35815ea429962c51a29 (diff) | |
download | rails-835617b71d2e829c27dbd16a82f22c186c821a0f.tar.gz rails-835617b71d2e829c27dbd16a82f22c186c821a0f.tar.bz2 rails-835617b71d2e829c27dbd16a82f22c186c821a0f.zip |
Do not include column limit in schema.rb if it matches the default
When working on engines that supports multiple databases, it's
very annoying to have a different schema.rb output based on which
database you use. MySQL being the primary offender.
This patch should reduce the disparities a bit.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb | 4 |
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 b944a8631c..5a95cffeca 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) |