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

Fix for 17509. Do not allow migration to have same name as context. #20143

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

lajones
Copy link
Contributor

@lajones lajones commented Mar 3, 2020

See #20126
@bricelam - this is the same code - but had problems with merge conflicts and old branch got corrupted, so created new branch to check this in.

@ajcvickers
Copy link
Member

@lajones Was there discussion around this:

How complicated would it be to scaffold [DbContext(typeof(The.Full.Namespace.Of.TheDbContext))] as needed instead?

@bricelam
Copy link
Contributor

bricelam commented Mar 3, 2020

@ajcvickers Yes, it started getting complicated since the model snapshot needs to know if any migration is named the same as the DbContext.

@ajcvickers
Copy link
Member

@bricelam Makes sense. Will throwing here break if people have edited their migrations to use a qualified name? In other words, does this change increase visibility but reduce the space of allowable workarounds? (The value here seems very low, so just trying to make sure we're not making anything worse.)

@bricelam
Copy link
Contributor

bricelam commented Mar 3, 2020

They could edit the code, but unless they've customized the code generation, they have to edit the model snapshot code every migration.

I'm also fine just closing the issue as wont-fix

@ajcvickers
Copy link
Member

@bricelam I think it's okay to merge.

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

Successfully merging this pull request may close these issues.

3 participants