aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-05-19 13:28:30 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-05-19 13:28:30 +0900
commit1aad9f6b5b610a487f248268b464fbbd74c82531 (patch)
tree367141b958a89fb1986df881e9a3e8d6d406c979 /activerecord/lib/active_record
parentb9b4fa9154e7c81ddb2bac4c5d53a9cb98c3351e (diff)
downloadrails-1aad9f6b5b610a487f248268b464fbbd74c82531.tar.gz
rails-1aad9f6b5b610a487f248268b464fbbd74c82531.tar.bz2
rails-1aad9f6b5b610a487f248268b464fbbd74c82531.zip
Both reference id and type should be `NOT NULL` if `null: false` is specified
This is a regression due to #28282. Fixes #29136.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb2
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