Skip to content
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

Make the 'foreign key column gets indexed' a IForeignKeyConvention #4416

Closed
BradBarnich opened this issue Jan 27, 2016 · 6 comments
Closed
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-cleanup
Milestone

Comments

@BradBarnich
Copy link

I am porting a large schema to EF7. We have tables where it would be impractical to have a reverse index for every foreign key property. We know this is not a best practice, but we also don't delete from the primary table.

Having as a convention, we could easily remove it from the ConventionSet during model creation. We are already doing this for the CascadeDeleteConvention.

Currently had to do this: BradBarnich@46ca0d3

Is there another workaround?

@mejje
Copy link

mejje commented Jan 29, 2016

My EF7 model hasn't created any automatic FK indices, I actually thought it was a deprecated feature since I haven't disabled anything but cascade delete as well. I'll try to find out why that happens.

@rowanmiller
Copy link
Contributor

@smitpatel @AndriySvyryd where in the stack do we currently introduce indexes on FKs?

@AndriySvyryd
Copy link
Member

It can be moved to a convention fairly easily

@rowanmiller
Copy link
Contributor

Decided that we should handle this as part of #214. There may be other things that should be moved to a convention, and we may want to combine and/or split existing conventions too.

@AndriySvyryd AndriySvyryd added type-enhancement closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. labels Nov 2, 2016
@AndriySvyryd AndriySvyryd added this to the 1.1.0 milestone Nov 2, 2016
@AndriySvyryd
Copy link
Member

This was fixed in ab9e75f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-cleanup
Projects
None yet
Development

No branches or pull requests

5 participants