dataobjects-net icon indicating copy to clipboard operation
dataobjects-net copied to clipboard

FK indexes are created despite ForeignKeyMode.None is used

Open ondrejtucny opened this issue 10 months ago • 0 comments

When the ForeignKeyMode.None setting is used and the schema is updated using DomainUpgradeMode.PerformSafely, the indexes for foreign keys are created, despite no foreign keys are created. They shouldn't. Alternatively, an IndexMode could be introduced to fine-tune automatic index creation. This is especially important in scenarios where FKs and indexes need to be hand-tweaked for the sake of performance (e.g. when partitioning is used).

Before running a schema update:

Image

After running a schema update:

Image

Note: Anything starting with ext_ is ignored using an IgnoreRule.

ondrejtucny avatar Mar 19 '25 12:03 ondrejtucny