From 1aad9f6b5b610a487f248268b464fbbd74c82531 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 19 May 2017 13:28:30 +0900 Subject: Both reference id and type should be `NOT NULL` if `null: false` is specified This is a regression due to #28282. Fixes #29136. --- .../active_record/connection_adapters/abstract/schema_definitions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') 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 -- cgit v1.2.3