Fix bug, when ':dependent => :destroy' option violates foreign key constraints, issue #12380
Merge pull request #12450 from iantropov/master

Fix bug, when ':dependent => :destroy' violates foreign key constraints

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/associations/builder/association.rb
	activerecord/lib/active_record/associations/builder/has_one.rb