-
Notifications
You must be signed in to change notification settings - Fork 256
Update enum quoting and default schema use #605
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
Conversation
0e37395 to
8816c0f
Compare
7a4a035 to
f3f7c9f
Compare
f3f7c9f to
b6f2c7c
Compare
c851233 to
b166e71
Compare
b166e71 to
71a6464
Compare
|
Does this request fix #623? If not, please fix it in a different PR, not here. This would make it easier to track changes. |
|
@YohDeadfall I mistakenly thought there would be some overlap in the issues, but they are indeed distinct. None of the changes included here are intended to address #623 (other than improving enum support, generally). |
YohDeadfall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good.
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlEnumTypeMapping.cs
Outdated
Show resolved
Hide resolved
|
Updated to |
cbc1f47 to
b93e1ee
Compare
|
Rebased and updated to reflect #621. |
|
@austindrenski I'll give this a full review, but can you please make clearer exactly what this PR covers? Is the description above still valid or has the scope of this PR changed? Regardless, one thing that immediately caught my eye:
This doesn't seem like the correct EF Core behavior. Executing the following:
Results in two tables being created under |
|
BTW does this depend on npgsql/npgsql#2121, whose PR npgsql/npgsql#2123 still seems to be WIP? |
Sure, I'll clean that up today. This PR grew and shifted a bit since I opened it, so the current description is a bit of lazy editing on my part.
Early on for EF Core, I thought I read some docs that discussed order being relevant in configuration, but I can't seem to find anything like that now. (Could have been a third-party blog, TBH.) What you describe makes more sense (and matches the internals too). I can go back through and move the default schema detection later in the process.
No, not anymore. An earlier draft was, but I reworked this one to use the simple "split on the first dot" approach while I work through npgsql/npgsql#2121 (which has turned out to be a bit more confusing than I first imagined). |
04dd4d3 to
46298b7
Compare
46298b7 to
2a6bea2
Compare
|
@roji The description is up to date, and I've rebased for the current I'd like to see this make it into @YohDeadfall Could you also give this another review? |
c758832 to
5f8e109
Compare
|
@YohDeadfall Appreciate the review—updated. |
- Properly quote schema and type name - Respect default schema annotation - Cache enum values and simplify non-null literal generation
5f8e109 to
1454851
Compare
|
I'd like to merge this and #626 tomorrow at 1:00 PM (UTC). If anyone wants more time for another round of review, just let me know. /cc @roji @YohDeadfall |
Changes
.ForNpgsqlHasEnum(...), then use the default schema annotation.StoreType).Fixes: #554
Fixes: #593