Closed Kukkimonsuta closed 1 year ago
@Kukkimonsuta thanks for reporting this and especially for the minimal repro - I can see the bug and its source. Your fix isn't quite in the right place - the Rewriter is only reponsible for rewriting a name (so should always receive a non-nullable string), and it's the NameRewritingConvention's job to not call it for nulls. This is a bit important since we don't want the convention to call e.g. HasDataName for indexes without names - that might have some side effect.
In any case, I've opened #179 to track this as an issue and will push a fix this. I'll try to release a new patch version of the plugin very soon.
Thanks again for reporting this!
In some situations the name being rewritten can be null. This causes issues for lowercase, uppercase and upper snake case rewriters - other rewriters already handle this. Unfortunately I was unable to reproduce this issue in unit test, so they are not included. Below you can find sample which reproduces the issue during
dotnet ef migrations add
.If possible I'd really appreciate if you could tell us timing on possible review and new release so we can act accordingly as this is currently blocking us from upgrading to EF 7. Thank you ❤️
Exception information: