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

Fully qualify CLR types in migrations when needed #27086

Open
roji opened this issue Dec 31, 2021 · 3 comments
Open

Fully qualify CLR types in migrations when needed #27086

roji opened this issue Dec 31, 2021 · 3 comments

Comments

@roji
Copy link
Member

roji commented Dec 31, 2021

Our migration and model snapshot reference property CLR types, but if the type name happens to be ambiguous, the migration doesn't compile. We need to full-qualify the CLR type with its namespace when needed.

Flagged by @kosmakoff in npgsql/efcore.pg#1976, where two enum types with the same name are referenced.

@ajcvickers
Copy link
Contributor

Duplicate of #25933?

@roji
Copy link
Member Author

roji commented Jan 3, 2022

Seems so! Though maybe we should rediscuss - we've done namespace prefixing for various other cases, and this doesn't seem like a totally exotic thing.

@ajcvickers
Copy link
Contributor

Note from triage: we should do this when two types in the same model have the sample simple name. Conflicts with types outside the model is still out-of-scope.

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

No branches or pull requests

2 participants