File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
railties/lib/rails/application Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change
1
+ * ` partial_inserts ` is now disabled by default in new apps.
2
+
3
+ This will be the default for new apps in Rails 7. To opt in:
4
+
5
+ ``` ruby
6
+ config.active_record.partial_inserts = false
7
+ ```
8
+
9
+ If a migration remove the default value of a column, this option
10
+ would cause old processes to no longer be able to create new records.
11
+
12
+ If you need to remove a column, you should first use ` ignored_columns`
13
+ to stop using it.
14
+
15
+ * Jean Boussier *
16
+
1
17
* Rails can now verify foreign keys after loading fixtures in tests.
2
18
3
19
This will be the default for new apps in Rails 7 . To opt in:
4
-
20
+
5
21
` ` ` ruby
6
22
config.active_record.verify_foreign_keys_for_fixtures = true
7
23
` ` `
8
-
24
+
9
25
Tests will not run if there is a foreign key constraint violation in your fixture data.
10
26
11
27
The feature is supported by SQLite and PostgreSQL , other adapters can also add support for it.
Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ def load_defaults(target_version)
229
229
230
230
if respond_to? ( :active_record )
231
231
active_record . verify_foreign_keys_for_fixtures = true
232
+ active_record . partial_inserts = false
232
233
end
233
234
else
234
235
raise "Unknown version #{ target_version . to_s . inspect } "
You can’t perform that action at this time.
0 commit comments