Skip to content

Commit bd720c9

Browse files
authored
Merge pull request rails#42760 from ghiculescu/patch-4
Add CHANGELOG for rails#42674
2 parents 2ddcaa1 + 32ff2c2 commit bd720c9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

activerecord/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
* Rails can now verify foreign keys after loading fixtures in tests.
2+
3+
This will be the default for new apps in Rails 7. To opt in:
4+
5+
```ruby
6+
config.active_record.verify_foreign_keys_for_fixtures = true
7+
```
8+
9+
Tests will not run if there is a foreign key constraint violation in your fixture data.
10+
11+
The feature is supported by SQLite and PostgreSQL, other adapters can also add support for it.
12+
13+
*Alex Ghiculescu*
14+
115
* Clear cached `has_one` association after setting `belongs_to` association to `nil`.
216

317
After setting a `belongs_to` relation to `nil` and updating an unrelated attribute on the owner,

0 commit comments

Comments
 (0)