aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-02-01 08:33:15 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-02-07 08:23:21 +0900
commit2aa9fd0718fa8fac75d25e87579e48e4740f915a (patch)
tree3a3592a2f30c22a4ff87a75386a6ceaf03229d3f /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
parentaff5e52484da7b4c2bc26552eb02222513d3976b (diff)
downloadrails-2aa9fd0718fa8fac75d25e87579e48e4740f915a.tar.gz
rails-2aa9fd0718fa8fac75d25e87579e48e4740f915a.tar.bz2
rails-2aa9fd0718fa8fac75d25e87579e48e4740f915a.zip
Deprecate `ColumnDumper#migration_keys`
`ColumnDumper#migration_keys` was extracted to customize keys for standardized column arguments widths. But the feature was removed in df84e98. The internal method is no longer used for that.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index d7e2818e35..7d602faf30 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -122,7 +122,7 @@ module ActiveRecord
checks = []
checks << lambda { |c| c.name == column_name }
checks << lambda { |c| c.type == type } if type
- migration_keys.each do |attr|
+ column_options_keys.each do |attr|
checks << lambda { |c| c.send(attr) == options[attr] } if options.key?(attr)
end
@@ -1172,6 +1172,9 @@ module ActiveRecord
end
private
+ def column_options_keys
+ [:limit, :precision, :scale, :default, :null, :collation, :comment]
+ end
def add_index_sort_order(quoted_columns, **options)
if order = options[:order]