diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-08-31 14:07:47 -0400 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2016-08-31 14:09:12 -0400 |
commit | b347156b15aea7f6229203e0cc1a58937ecb8e93 (patch) | |
tree | aef65dd98d78468ce3f3f93dac1fd15b2f3b326c /activerecord/lib/active_record/model_schema.rb | |
parent | 6236cb7e6ad8bc18af2c3dc0118708d3e456bdce (diff) | |
download | rails-b347156b15aea7f6229203e0cc1a58937ecb8e93.tar.gz rails-b347156b15aea7f6229203e0cc1a58937ecb8e93.tar.bz2 rails-b347156b15aea7f6229203e0cc1a58937ecb8e93.zip |
Remove deprecated handling of PG Points
There are some minor changes to the point type as I had forgotten that
this will affect the behavior of `t.point` in migrations and the schema
dumper so we need to handle those as well.
I'll say this again so I can convince myself to come up with a better
structure... TYPES SHOULD NOT CARE ABOUT SCHEMA DUMPING AND WE NEED TO
BETTER SEPARATE THESE.
Diffstat (limited to 'activerecord/lib/active_record/model_schema.rb')
-rw-r--r-- | activerecord/lib/active_record/model_schema.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 4ccc5fbb21..f49f8da2ed 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -370,7 +370,6 @@ module ActiveRecord def load_schema! @columns_hash = connection.schema_cache.columns_hash(table_name).except(*ignored_columns) @columns_hash.each do |name, column| - warn_if_deprecated_type(column) define_attribute( name, connection.lookup_cast_type_from_column(column), @@ -421,28 +420,6 @@ module ActiveRecord base.table_name end end - - def warn_if_deprecated_type(column) - return if attributes_to_define_after_schema_loads.key?(column.name) - if column.respond_to?(:oid) && column.sql_type.start_with?("point") - if column.array? - array_arguments = ", array: true" - else - array_arguments = "" - end - ActiveSupport::Deprecation.warn(<<-WARNING.strip_heredoc) - The behavior of the `:point` type will be changing in Rails 5.1 to - return a `Point` object, rather than an `Array`. If you'd like to - keep the old behavior, you can add this line to #{name}: - - attribute :#{column.name}, :legacy_point#{array_arguments} - - If you'd like the new behavior today, you can add this line: - - attribute :#{column.name}, :point#{array_arguments} - WARNING - end - end end end end |