Skip to content

FK indexes are created despite ForeignKeyMode.None is used #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ondrejtucny opened this issue Mar 19, 2025 · 0 comments
Open

FK indexes are created despite ForeignKeyMode.None is used #428

ondrejtucny opened this issue Mar 19, 2025 · 0 comments

Comments

@ondrejtucny
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant