-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Log warning when credentials used for reverse engineering does not have view definition rights #26776
Conversation
…ave 'VIEW DEFINITION' rights
…ave 'VIEW DEFINITION' rights
@@ -70,7 +70,8 @@ private enum Id | |||
ReflexiveConstraintIgnored, | |||
DuplicateForeignKeyConstraintIgnored, | |||
ColumnWithoutTypeWarning, | |||
ForeignKeyReferencesUnknownPrincipalTableWarning | |||
ForeignKeyReferencesUnknownPrincipalTableWarning, |
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.
Line 36 and 37 here looks like an error waiting to happen...
Maybe they should be removed?
@@ -248,6 +248,10 @@ | |||
<value>Unable to find a table in the database matching the selected table '{table}'.</value> | |||
<comment>Warning SqlServerEventId.MissingTableWarning string?</comment> | |||
</data> | |||
<data name="LogMissingViewDefinitionRights" xml:space="preserve"> | |||
<value>Aspects of your schema definition may be missing, as the credentials in use has not been granted 'VIEW DEFINITION' rights.</value> |
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.
Suggestions for phrasing this?
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.
Could be:
Unable to fully reverse engineer your database, because the credentials used have not been granted 'VIEW DEFINITION' rights for the database.
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.
cc: @dotnet/efteam for warning message review.
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.
How about, "The database user has not been granted 'VIEW DEFINITION' rights. Scaffolding requires these rights to construct the Entity Framework model correctly. Without these rights, parts of the scaffolded model may be missing, resulting in incorrect interactions between Entity Framework and the database at runtime."
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.
LGTM, maybe just "parts" iso "the parts"?
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.
@ErikEJ Corrected inline.
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.
I have updated the message now
Thank you @ErikEJ |
fixes #22842