Enable active_record.belongs_to_required_by_default
This switches the logic so that belongs_to parent objects must exist by default, and marks the optional ones explicitly. This is reflected in the null/not_null status on the relevant db columns.
This commit is contained in:
parent
3cf3b3ce4e
commit
619ac4c5b2
11 changed files with 15 additions and 19 deletions
|
@ -35,10 +35,6 @@ module OpenStreetMap
|
|||
# This has defaulted to false since rails 6.0
|
||||
config.action_view.default_enforce_utf8 = true
|
||||
|
||||
# This defaults to true from rails 5.0 but our code doesn't comply
|
||||
# with it at all so we turn it off
|
||||
config.active_record.belongs_to_required_by_default = false unless Settings.status == "database_offline"
|
||||
|
||||
# Use SQL instead of Active Record's schema dumper when creating the database.
|
||||
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
||||
# like if you have constraints or database-specific column types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue