diff options
author | Matthew Draper <matthew@trebex.net> | 2017-05-24 13:57:42 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-24 13:57:42 +0930 |
commit | cceee994bdcff6d3f6c1c225e209dbff1152fdbb (patch) | |
tree | 0c18e8bdf263de0bf2963ded1a6b5a974a92458f /activerecord/lib/active_record | |
parent | ef763d6933e35f1c4700597e7489f748a53c9390 (diff) | |
parent | 1aad9f6b5b610a487f248268b464fbbd74c82531 (diff) | |
download | rails-cceee994bdcff6d3f6c1c225e209dbff1152fdbb.tar.gz rails-cceee994bdcff6d3f6c1c225e209dbff1152fdbb.tar.bz2 rails-cceee994bdcff6d3f6c1c225e209dbff1152fdbb.zip |
Merge pull request #29145 from kamipo/reference_type_should_be_not_null
Both reference id and type should be `NOT NULL` if `null: false` is specified
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 46d7f84efd..a30fbe0e05 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -146,7 +146,7 @@ module ActiveRecord end def polymorphic_options - as_options(polymorphic) + as_options(polymorphic).merge(null: options[:null]) end def index_options |