diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/schema_dumper.rb
+++ b/activerecord/lib/active_record/schema_dumper.rb
@@ -127,7 +127,7 @@ HEADER
           end.compact
 
           # find all migration keys used in this table
-          keys = [:name, :limit, :precision, :scale, :default, :null] & column_specs.map(&:keys).flatten
+          keys = [:name, :limit, :precision, :scale, :default, :null]
 
           # figure out the lengths for each column based on above keys
           lengths = keys.map { |key|
just use the list of formatting keys we care about