diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-06-03 20:57:28 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 20:57:28 +0900 |
commit | c926ca46280aee795b98206dd0707a96b9423cc5 (patch) | |
tree | 99c9199bf71835f18e2c746b04abe70569e5baed /activerecord/lib/active_record/connection_adapters | |
parent | eece0bf1087dc2cb59605a5a9beb88c6b935c194 (diff) | |
parent | 49f31043be571381fd66dbc22b123d5625af64de (diff) | |
download | rails-c926ca46280aee795b98206dd0707a96b9423cc5.tar.gz rails-c926ca46280aee795b98206dd0707a96b9423cc5.tar.bz2 rails-c926ca46280aee795b98206dd0707a96b9423cc5.zip |
Merge pull request #36384 from guigs/fix-invalid-schema-when-pk-column-has-comment
Fix invalid schema dump when primary key column has a comment
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb | 2 |
1 files changed, 1 insertions, 1 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 622e00fffb..fb56e712be 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb @@ -15,7 +15,7 @@ module ActiveRecord def column_spec_for_primary_key(column) return {} if default_primary_key?(column) spec = { id: schema_type(column).inspect } - spec.merge!(prepare_column_options(column).except!(:null)) + spec.merge!(prepare_column_options(column).except!(:null, :comment)) spec[:default] ||= "nil" if explicit_primary_key_default?(column) spec end |