Checks if automatic indexing of foreign keys is enabled.
Defaults to true when the auto_index_foreign_keys setting is absent.
Config absence must be the safe choice here: neither SQL Server nor PostgreSQL
auto-indexes FK columns, yet MJ leans on them heavily — generated base views join
FK relationships, RunView filters on them, and CodeGen emits cascade-delete logic
that walks children by FK. A missing FK index therefore degrades silently and is
very hard for a customer to diagnose (it looks like "MJ is slow", not "an index is
missing"), whereas a surplus index is cheap and trivially reversible (DROP INDEX).
This previously defaulted to false, which meant any deployment that never set the
setting explicitly — including distribution installs — generated no FK indexes at all.
Returns boolean
True if auto-indexing is enabled (the default), false only if explicitly disabled
Checks if automatic indexing of foreign keys is enabled.
Defaults to
truewhen theauto_index_foreign_keyssetting is absent. Config absence must be the safe choice here: neither SQL Server nor PostgreSQL auto-indexes FK columns, yet MJ leans on them heavily — generated base views join FK relationships,RunViewfilters on them, and CodeGen emits cascade-delete logic that walks children by FK. A missing FK index therefore degrades silently and is very hard for a customer to diagnose (it looks like "MJ is slow", not "an index is missing"), whereas a surplus index is cheap and trivially reversible (DROP INDEX).This previously defaulted to
false, which meant any deployment that never set the setting explicitly — including distribution installs — generated no FK indexes at all.