diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-02-09 08:29:10 -0700 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-02-09 08:29:10 -0700 |
commit | bae903440da0699180bc6766fb9f8e3d1b8e95dc (patch) | |
tree | c3f49212311439d46a3c5b85e33271334f379ddc /activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb | |
parent | 8ba75488773c2d7e4cdf267fb8d4553e8363910c (diff) | |
parent | b199012c4f01693f18e2143f43c1bf928bae1860 (diff) | |
download | rails-bae903440da0699180bc6766fb9f8e3d1b8e95dc.tar.gz rails-bae903440da0699180bc6766fb9f8e3d1b8e95dc.tar.bz2 rails-bae903440da0699180bc6766fb9f8e3d1b8e95dc.zip |
Merge pull request #18849 from kamipo/array_type_is_a_part_of_sql_type
An array type is a part of `sql_type`
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb index db20b60d60..81f8615976 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb @@ -28,7 +28,7 @@ module ActiveRecord end def visit_ColumnDefinition(o) - o.sql_type = type_to_sql(o.type, o.limit, o.precision, o.scale) + o.sql_type ||= type_to_sql(o.type, o.limit, o.precision, o.scale) column_sql = "#{quote_column_name(o.name)} #{o.sql_type}" add_column_options!(column_sql, column_options(o)) unless o.type == :primary_key column_sql |